summaryrefslogtreecommitdiff
path: root/cmake/Modules
diff options
context:
space:
mode:
authorGwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>2019-12-04 18:25:21 +0100
committerMarcus Müller <marcus@hostalia.de>2019-12-19 18:20:22 +0100
commitbd588eb03e2a897e419b5009f4f82b7d45b57cad (patch)
treeb60c0386887fd5ba2db53ae0d2075bb5c34f86c2 /cmake/Modules
parent7ec505f41e38599669c35001c507ee8c9680ad54 (diff)
cmake:Modules:GnuradioConfig.cmake.in: add unit_test_framework only when ENABLE_TESTING is ON
Diffstat (limited to 'cmake/Modules')
-rw-r--r--cmake/Modules/GnuradioConfig.cmake.in14
1 files changed, 11 insertions, 3 deletions
diff --git a/cmake/Modules/GnuradioConfig.cmake.in b/cmake/Modules/GnuradioConfig.cmake.in
index 1e5ad20ece..388cac4e9b 100644
--- a/cmake/Modules/GnuradioConfig.cmake.in
+++ b/cmake/Modules/GnuradioConfig.cmake.in
@@ -24,15 +24,23 @@ list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_LIST_DIR}")
find_dependency(LOG4CPP)
find_dependency(MPLIB)
-find_dependency(Boost "@Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@.@Boost_SUBMINOR_VERSION@" COMPONENTS
+
+set(BOOST_REQUIRED_COMPONENTS
date_time
program_options
filesystem
system
regex
thread
- unit_test_framework
- )
+)
+
+set(ENABLE_TESTING @ENABLE_TESTING@ CACHE BOOL "Enable testing support")
+
+if(ENABLE_TESTING)
+ list(APPEND BOOST_REQUIRED_COMPONENTS unit_test_framework)
+endif(ENABLE_TESTING)
+
+find_dependency(Boost "@Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@.@Boost_SUBMINOR_VERSION@" COMPONENTS ${BOOST_REQUIRED_COMPONENTS})
find_dependency(Volk)
set(ENABLE_PYTHON @ENABLE_PYTHON@ CACHE BOOL "Enable Python & SWIG")
if(${ENABLE_PYTHON})