summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorVolker Schroer <3470424+dl1ksv@users.noreply.github.com>2020-11-24 12:37:05 +0100
committermormj <34754695+mormj@users.noreply.github.com>2020-12-03 13:51:52 -0500
commita3061b8fe69fb8407d52d7f43cae57796015d185 (patch)
tree82fa7b467519846e1eb66416f7cc79011c05ef3b /cmake
parenta8b25c79083cc9abdd5079f5d6fe83965e8fc03e (diff)
Do not disable boost, if only the unit_test_framework is missing
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/GrBoost.cmake7
1 files changed, 2 insertions, 5 deletions
diff --git a/cmake/Modules/GrBoost.cmake b/cmake/Modules/GrBoost.cmake
index 92de7d538b..f73dd856ad 100644
--- a/cmake/Modules/GrBoost.cmake
+++ b/cmake/Modules/GrBoost.cmake
@@ -23,10 +23,6 @@ set(BOOST_REQUIRED_COMPONENTS
thread
)
-if(ENABLE_TESTING)
- list(APPEND BOOST_REQUIRED_COMPONENTS unit_test_framework)
-endif(ENABLE_TESTING)
-
if(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
list(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix
endif(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64")
@@ -73,7 +69,8 @@ set(Boost_ADDITIONAL_VERSIONS
"1.71.0" "1.71"
)
-find_package(Boost ${GR_BOOST_MIN_VERSION} COMPONENTS ${BOOST_REQUIRED_COMPONENTS})
+find_package(Boost ${GR_BOOST_MIN_VERSION} REQUIRED ${BOOST_REQUIRED_COMPONENTS}
+ OPTIONAL_COMPONENTS unit_test_framework)
# Boost 1.52 disabled, see https://svn.boost.org/trac/boost/ticket/7669
# Similar problems with Boost 1.46 and 1.47.