MLECO-2752: Minor refactoring for native global steps.

And further optimisations of extendability for platform build
steps. Added a list for excluded use-cases.

Change-Id: I5a9398bbeb595a5bf2ea39b81623e4f20238f948
Signed-off-by: alexander <alexander.efremov@arm.com>
diff --git a/scripts/cmake/util_functions.cmake b/scripts/cmake/util_functions.cmake
index f9742f7..447265c 100644
--- a/scripts/cmake/util_functions.cmake
+++ b/scripts/cmake/util_functions.cmake
@@ -174,3 +174,20 @@
     endif()
 
 endfunction()
+
+function(add_platform_build_configuration)
+
+    set(oneValueArgs TARGET_PLATFORM)
+    cmake_parse_arguments(PARSED "" "${oneValueArgs}" "" ${ARGN} )
+    message(STATUS "Searching for ${PARSED_TARGET_PLATFORM} build configuration")
+    list(APPEND PLATFORM_BUILD_CONFIG_DIRS ${CMAKE_SCRIPTS_DIR}/platforms)
+
+    FIND_PATH(PLATFORM_BUILD_CONFIG
+            NAMES build_configuration.cmake
+            PATH_SUFFIXES ${PARSED_TARGET_PLATFORM}
+            PATHS ${PLATFORM_BUILD_CONFIG_DIRS}
+            )
+
+    message(STATUS "Found build configuration: ${PLATFORM_BUILD_CONFIG}")
+    include(${PLATFORM_BUILD_CONFIG}/build_configuration.cmake)
+endfunction()
\ No newline at end of file