diff options
author | Ryan OShea <ryan.oshea3@arm.com> | 2023-03-20 11:10:40 +0000 |
---|---|---|
committer | Francis Murtagh <francis.murtagh@arm.com> | 2023-05-08 16:59:40 +0000 |
commit | a3dc95ec2b0ac9e7f87dd32d03679a4b2a9b5d2a (patch) | |
tree | f65bf6ebae620be85cd1122e32889b9e8b69e1b8 /CMakeLists.txt | |
parent | f6ed6d410dca0bbf22f338ca6e2fafd36d5c963f (diff) | |
download | armnn-a3dc95ec2b0ac9e7f87dd32d03679a4b2a9b5d2a.tar.gz |
Improve reusability of code that is defined out by cmake build paths
* Added new ARMNN_STUB_PROFILING and ARMNN_DISABLE_DYNAMIC_BACKEND
defines to replace BUILD_BARE_METAL and BUILD_EXECUTE_NETWORK_STATIC
* Add new CMake variables to disable sample apps and dynamic backends
* Improve BUILD_SHARED_LIBS CMake variable
* Add new archive output location to various libraries so that the
static libraries appear in the same location as the shared libraries
* Fixes for bare metal build
* Add ARMNN_DISABLE_FILE_SYSTEM defines to missing locations
Signed-off-by: Ryan OShea <ryan.oshea3@arm.com>
Change-Id: I1db9a8f483e7134bd261294b35240cf21b150d45
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index edb1485126..a20543b9ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,12 +56,15 @@ include(GNUInstallDirs) add_subdirectory(profiling/common/src) add_subdirectory(profiling/client/src) - -add_subdirectory(samples) +if(ARMNN_SAMPLE_APPS_ENABLED) + add_subdirectory(samples) +endif() add_subdirectory(src/armnnTfLiteParser) add_subdirectory(src/armnnSerializer) add_subdirectory(src/armnnDeserializer) -add_subdirectory(src/armnnTestUtils) +if(BUILD_UNIT_TESTS) + add_subdirectory(src/armnnTestUtils) +endif() if (BUILD_TESTS) add_subdirectory(tests) @@ -456,14 +459,10 @@ if (BUILD_OPAQUE_DELEGATE) add_definitions(-DARMNN_TFLITE_OPAQUE_DELEGATE) endif() -if(BUILD_BARE_METAL OR EXECUTE_NETWORK_STATIC) - add_library_ex(armnn STATIC ${armnn_sources}) +if (BUILD_SHARED_LIBS) + add_library_ex(armnn SHARED ${armnn_sources}) else() - if (BUILD_SHARED_LIBS) - add_library_ex(armnn SHARED ${armnn_sources}) - else() - add_library(armnn ${armnn_sources}) - endif() + add_library(armnn STATIC ${armnn_sources}) endif() target_compile_definitions(armnn PRIVATE "ARMNN_COMPILING_DLL") |