From a3dc95ec2b0ac9e7f87dd32d03679a4b2a9b5d2a Mon Sep 17 00:00:00 2001 From: Ryan OShea Date: Mon, 20 Mar 2023 11:10:40 +0000 Subject: 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 Change-Id: I1db9a8f483e7134bd261294b35240cf21b150d45 --- src/armnnTestUtils/CMakeLists.txt | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/armnnTestUtils') diff --git a/src/armnnTestUtils/CMakeLists.txt b/src/armnnTestUtils/CMakeLists.txt index a4333cf306..b2f31245b7 100755 --- a/src/armnnTestUtils/CMakeLists.txt +++ b/src/armnnTestUtils/CMakeLists.txt @@ -31,23 +31,20 @@ list(APPEND armnnTestUtils_sources TestUtils.hpp ) -if(NOT BUILD_BARE_METAL AND NOT EXECUTE_NETWORK_STATIC) list(APPEND armnnTestUtils_sources UnitTests.cpp UnitTests.hpp ) -endif() - -if(BUILD_BARE_METAL) - add_library_ex(armnnTestUtils STATIC ${armnnTestUtils_sources}) -elseif(EXECUTE_NETWORK_STATIC) - add_library_ex(armnnTestUtils OBJECT ${armnnTestUtils_sources}) -else() +if(BUILD_SHARED_LIBS) add_library_ex(armnnTestUtils SHARED ${armnnTestUtils_sources}) +else() + add_library_ex(armnnTestUtils STATIC ${armnnTestUtils_sources}) endif() set_target_properties(armnnTestUtils PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) +set_target_properties(armnnTestUtils PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) + target_include_directories(armnnTestUtils PUBLIC -- cgit v1.2.1