Skip to content

Commit ea37d73

Browse files
authored
fixed #13821 - use Boost unconditionally if it is available (danmar#7494)
1 parent d0ce649 commit ea37d73

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

cmake/findDependencies.cmake

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,16 @@ endif()
8484

8585
find_package(Threads REQUIRED)
8686

87+
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.30")
88+
# avoid legacy warning about Boost lookup in CMake
89+
cmake_policy(SET CMP0167 NEW)
90+
endif()
91+
92+
# we are only using the header-only "container" component so we can unconditionally search for it
8793
if(USE_BOOST)
88-
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.30")
89-
# avoid legacy warning about Boost lookup in CMake
90-
cmake_policy(SET CMP0167 NEW)
91-
endif()
92-
# we are using the header-only "container" component
93-
find_package(Boost QUIET)
94+
find_package(Boost REQUIRED)
95+
else()
96+
find_package(Boost)
9497
endif()
9598

9699
find_program(LIBXML2_XMLLINT_EXECUTABLE xmllint)

cmake/options.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ option(DISALLOW_THREAD_EXECUTOR "Disallow usage of ThreadExecutor for -j"
8989
if(DISALLOW_THREAD_EXECUTOR AND WIN32)
9090
message(FATAL_ERROR "Cannot disable usage of ThreadExecutor on Windows as no other executor implementation is currently available")
9191
endif()
92-
option(USE_BOOST "Usage of Boost" OFF)
92+
option(USE_BOOST "Force usage of Boost" OFF)
9393
option(USE_BOOST_INT128 "Usage of Boost.Multiprecision 128-bit integer for Mathlib" OFF)
9494
if (NOT USE_BOOST AND USE_BOOST_INT128)
9595
message(FATAL_ERROR "USE_BOOST_INT128 requires USE_BOOST to be enabled")

releasenotes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ Other:
2222
- added CMake option `ENABLE_CSA_ALPHA` to enable the Clang Static Analyzer alpha checkers
2323
- Updated TinyXML-2 to v11.0.0
2424
- The minimum supported Python version has been bumped to 3.7.
25+
- CMake will now unconditionally use Boost.Containers if available. If CMake option `USE_BOOST` is specified it will now bail out when it is not found.
2526
-

0 commit comments

Comments
 (0)