summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authoralexander <alexander.efremov@arm.com>2022-02-11 13:23:22 +0000
committerKshitij Sisodia <kshitij.sisodia@arm.com>2022-02-11 18:11:35 +0000
commitcb8a987ce714283b66db49d1bc9d5b108caaa707 (patch)
treeb00f86587c8b15d0391691d415220b2bbbcf6ea9 /CMakeLists.txt
parent31ae9f09bb3535975595e999fbc7baca889e46e8 (diff)
downloadml-embedded-evaluation-kit-cb8a987ce714283b66db49d1bc9d5b108caaa707.tar.gz
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>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 8 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5a7f1f2..51e21eb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,7 +57,8 @@ else()
endif()
include(${CMAKE_SCRIPTS_DIR}/common_user_options.cmake)
-include(${CMAKE_SCRIPTS_DIR}/platforms/${TARGET_PLATFORM}/build_configuration.cmake)
+
+add_platform_build_configuration(TARGET_PLATFORM ${TARGET_PLATFORM})
set_platform_global_defaults()
@@ -88,9 +89,6 @@ set(SRC_PATH ${CMAKE_CURRENT_SOURCE_DIR}/source)
set(TEST_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/tests)
list(APPEND USE_CASES_TESTS_SEARCH_DIR_LIST ${TEST_SRCS}/use_case)
-if (CPU_PROFILE_ENABLED)
- set(PROFILING_OPT "${PROFILING_OPT} -DCPU_PROFILE_ENABLED")
-endif()
# We include log target
add_subdirectory(${SRC_PATH}/log ${CMAKE_BINARY_DIR}/log)
@@ -147,6 +145,8 @@ else()
set(USE_CASES ${USE_CASE_BUILD})
endif()
+list(REMOVE_ITEM USE_CASES "" ${EXCLUDED_USE_CASES})
+message(STATUS "Use-cases excluded by platform configuration: ${EXCLUDED_USE_CASES}")
message(STATUS "Building use-cases: ${USE_CASES}.")
foreach(use_case ${USE_CASES})
@@ -220,6 +220,10 @@ foreach(use_case ${USE_CASES})
target_compile_definitions(${UC_LIB_NAME} PUBLIC
"ACTIVATION_BUF_SZ=${${use_case}_ACTIVATION_BUF_SZ}")
+ # Set the CPU profiling defintiion
+ target_compile_definitions(${UC_LIB_NAME} PRIVATE
+ $<$<BOOL:${CPU_PROFILE_ENABLED}>:CPU_PROFILE_ENABLED>)
+
target_link_libraries(${UC_LIB_NAME} PUBLIC
log
arm_math