diff options
Diffstat (limited to 'targets/common/CMakeLists.txt')
-rw-r--r-- | targets/common/CMakeLists.txt | 7 |
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) |