diff options
author | Matthew Bentham <matthew.bentham@arm.com> | 2020-11-13 12:04:01 +0000 |
---|---|---|
committer | TeresaARM <teresa.charlinreyes@arm.com> | 2020-11-13 15:10:44 +0000 |
commit | e688d611acf8efec5e2c79db0654d28d44d82a77 (patch) | |
tree | ab6b16b5427d5da54fe8b5b6b87e252cbd0204e5 | |
parent | 9234e5faf644c29405cf409b3075e51c388f49e0 (diff) | |
download | armnn-e688d611acf8efec5e2c79db0654d28d44d82a77.tar.gz |
Wrap FindBoost in if(BUILD_UNIT_TESTS) so that it can be excluded entirely
Signed-off-by: Matthew Bentham <matthew.bentham@arm.com>
Change-Id: Iabe1b10e53d393a19e681156c001d6a2e9eb835e
-rw-r--r-- | cmake/GlobalConfig.cmake | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cmake/GlobalConfig.cmake b/cmake/GlobalConfig.cmake index 01ce91fc52..360f06860e 100644 --- a/cmake/GlobalConfig.cmake +++ b/cmake/GlobalConfig.cmake @@ -134,10 +134,12 @@ if (NOT BUILD_PIPE_ONLY) else() set(Boost_USE_STATIC_LIBS ON) endif() - add_definitions("-DBOOST_ALL_NO_LIB") # Turn off auto-linking as we specify the libs manually - find_package(Boost 1.59 REQUIRED COMPONENTS unit_test_framework) - include_directories(SYSTEM "${Boost_INCLUDE_DIRS}") - link_directories(${Boost_LIBRARY_DIRS}) + if (BUILD_UNIT_TESTS) + add_definitions("-DBOOST_ALL_NO_LIB") # Turn off auto-linking as we specify the libs manually + find_package(Boost 1.59 REQUIRED COMPONENTS unit_test_framework) + include_directories(SYSTEM "${Boost_INCLUDE_DIRS}") + link_directories(${Boost_LIBRARY_DIRS}) + endif() endif() if (NOT BUILD_PIPE_ONLY) |