diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7e76321e..cce6e30b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -32,9 +32,11 @@ endif() set(GOOGLE_TEST_INDIVIDUAL OFF) include(AddGoogletest) -# Add boost to test boost::optional if available -find_package(Boost 1.61) - +# Add boost to test boost::optional (currently explicitly requested)" +option(CLI11_BOOST "Turn on boost test (currently may fail with Boost 1.70)" OFF) +if(CLI11_BOOST) + find_package(Boost 1.61 REQUIRED) +endif() set(boost-optional-def $<$:CLI11_BOOST_OPTIONAL>) set(CLI11_TESTS