From 870b96c643388ae88dd4245b9169f526d6a8d49e Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Fri, 25 Mar 2022 21:24:56 +0000 Subject: IVGCVSW-6707 Enables a bare metal compile Change-Id: Icc2f83c5f27f413758fee3e5c1445e9fc44f42c8 Signed-off-by: Jim Flynn --- src/armnnTestUtils/CMakeLists.txt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/armnnTestUtils') diff --git a/src/armnnTestUtils/CMakeLists.txt b/src/armnnTestUtils/CMakeLists.txt index b90a71e66e..3f6fb415a2 100755 --- a/src/armnnTestUtils/CMakeLists.txt +++ b/src/armnnTestUtils/CMakeLists.txt @@ -29,11 +29,21 @@ list(APPEND armnnTestUtils_sources TensorCopyUtils.cpp TestUtils.cpp TestUtils.hpp + ) + +if(NOT BUILD_BARE_METAL) +list(APPEND armnnTestUtils_sources UnitTests.cpp UnitTests.hpp ) +endif() + -add_library_ex(armnnTestUtils SHARED ${armnnTestUtils_sources}) +if(BUILD_BARE_METAL) + add_library_ex(armnnTestUtils STATIC ${armnnTestUtils_sources}) +else() + add_library_ex(armnnTestUtils SHARED ${armnnTestUtils_sources}) +endif() set_target_properties(armnnTestUtils PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) @@ -59,4 +69,4 @@ install(TARGETS armnnTestUtils add_library(Armnn::armnnTestUtils ALIAS armnnTestUtils) -set_target_properties(armnnTestUtils PROPERTIES VERSION ${ARMNN_TEST_UTILS_LIB_VERSION} SOVERSION ${ARMNN_TEST_UTILS_LIB_SOVERSION}) \ No newline at end of file +set_target_properties(armnnTestUtils PROPERTIES VERSION ${ARMNN_TEST_UTILS_LIB_VERSION} SOVERSION ${ARMNN_TEST_UTILS_LIB_SOVERSION}) -- cgit v1.2.1