aboutsummaryrefslogtreecommitdiff
path: root/targets/common/CMakeLists.txt
diff options
context:
space:
mode:
authorKristofer Jonsson <kristofer.jonsson@arm.com>2021-06-04 18:02:59 +0200
committerKristofer Jonsson <kristofer.jonsson@arm.com>2021-06-28 10:43:50 +0200
commitec451550f961ee940e2d9393bd6a52f4d2c25685 (patch)
tree01fe598a9af85b3f8ae38a353022c83a084f633c /targets/common/CMakeLists.txt
parentdabf6b5d835ff8bba36764d3db4dcc07f826dc3f (diff)
downloadethos-u-core-platform-ec451550f961ee940e2d9393bd6a52f4d2c25685.tar.gz
Buildsystem restructuring
- Allow linker file to be overriden - Disable Trustzone build for other targets than Corstone-300 - Make toolchain TARGET_CPU variable cached Change-Id: I98a15e1080e4bf49e029578888b1e4ce362bbab7
Diffstat (limited to 'targets/common/CMakeLists.txt')
-rw-r--r--targets/common/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/targets/common/CMakeLists.txt b/targets/common/CMakeLists.txt
index f3382f3..3e222be 100644
--- a/targets/common/CMakeLists.txt
+++ b/targets/common/CMakeLists.txt
@@ -41,6 +41,8 @@ add_subdirectory(${ETHOSU_CORE_SOFTWARE_PATH} core_software)
# ethosu_target_common # Common for all targets
###############################################################################
+option(CPU_CACHE_ENABLE "Enable CPU instruction- and data cache" OFF)
+
# Common
add_library(ethosu_target_common INTERFACE)
target_include_directories(ethosu_target_common INTERFACE include)
@@ -49,6 +51,11 @@ target_include_directories(ethosu_target_common INTERFACE include)
add_library(ethosu_target_link INTERFACE)
target_link_libraries(ethosu_target_link INTERFACE ethosu_target_common)
+# Configuring caches
+if (CPU_CACHE_ENABLE)
+ target_compile_definitions(ethosu_target_link INTERFACE CPU_CACHE_ENABLE)
+endif()
+
# Startup
add_library(ethosu_target_startup INTERFACE)
target_link_libraries(ethosu_target_startup INTERFACE ethosu_target_link)