From cb8a987ce714283b66db49d1bc9d5b108caaa707 Mon Sep 17 00:00:00 2001 From: alexander Date: Fri, 11 Feb 2022 13:23:22 +0000 Subject: 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 --- scripts/cmake/util_functions.cmake | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'scripts/cmake/util_functions.cmake') 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 @@ function(download_file_from_modelzoo model_zoo_version file_sub_path download_pa 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 -- cgit v1.2.1