summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Grund <Flamefire@users.noreply.github.com>2020-04-19 16:06:29 +0200
committerBrad King <brad.king@kitware.com>2020-04-20 08:27:32 -0400
commit9daf79c53b65317b6c2e6d216d916a5007ced40b (patch)
tree3782e36a8d2b78c816cfda63c1c8a41571746bc9
parentf48051d33f1f6b2ff252744205810475645349ec (diff)
downloadcmake-9daf79c53b65317b6c2e6d216d916a5007ced40b.tar.gz
FindBoost: Add support for Boost 1.73
Run `Utilities/Scripts/BoostScanDeps.cmake` with the Boost 1.73.0 sources to compute dependencies. This includes a new Boost.Nowide library. Special case: Boost.Filesystem is an optional dependency as the include is only required to make Boost.Filesystem use UTF-8 paths on user request
-rw-r--r--Modules/FindBoost.cmake17
-rw-r--r--Utilities/Scripts/BoostScanDeps.cmake6
2 files changed, 22 insertions, 1 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 69776ed2b7..e1eff91146 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -1147,7 +1147,7 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret)
set(_Boost_TIMER_DEPENDENCIES chrono)
set(_Boost_WAVE_DEPENDENCIES filesystem serialization thread chrono date_time atomic)
set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
- else()
+ elseif(Boost_VERSION_STRING VERSION_LESS 1.73.0)
set(_Boost_CONTRACT_DEPENDENCIES thread chrono date_time)
set(_Boost_COROUTINE_DEPENDENCIES context)
set(_Boost_FIBER_DEPENDENCIES context)
@@ -1161,6 +1161,20 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret)
set(_Boost_TIMER_DEPENDENCIES chrono)
set(_Boost_WAVE_DEPENDENCIES filesystem serialization thread chrono date_time atomic)
set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+ else()
+ set(_Boost_CONTRACT_DEPENDENCIES thread chrono date_time)
+ set(_Boost_COROUTINE_DEPENDENCIES context)
+ set(_Boost_FIBER_DEPENDENCIES context)
+ set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+ set(_Boost_LOG_DEPENDENCIES date_time log_setup filesystem thread regex chrono atomic)
+ set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
+ set(_Boost_MPI_DEPENDENCIES serialization)
+ set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+ set(_Boost_NUMPY_DEPENDENCIES python${component_python_version})
+ set(_Boost_THREAD_DEPENDENCIES chrono date_time atomic)
+ set(_Boost_TIMER_DEPENDENCIES chrono)
+ set(_Boost_WAVE_DEPENDENCIES filesystem serialization thread chrono date_time atomic)
+ set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
if(NOT Boost_VERSION_STRING VERSION_LESS 1.73.0)
message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets")
endif()
@@ -1226,6 +1240,7 @@ function(_Boost_COMPONENT_HEADERS component _hdrs)
set(_Boost_MPI_HEADERS "boost/mpi.hpp")
set(_Boost_MPI_PYTHON_HEADERS "boost/mpi/python/config.hpp")
set(_Boost_NUMPY_HEADERS "boost/python/numpy.hpp")
+ set(_Boost_NOWIDE_HEADERS "boost/nowide/cstdlib.hpp")
set(_Boost_PRG_EXEC_MONITOR_HEADERS "boost/test/prg_exec_monitor.hpp")
set(_Boost_PROGRAM_OPTIONS_HEADERS "boost/program_options.hpp")
set(_Boost_PYTHON_HEADERS "boost/python.hpp")
diff --git a/Utilities/Scripts/BoostScanDeps.cmake b/Utilities/Scripts/BoostScanDeps.cmake
index 9e6d358b44..5794d03e89 100644
--- a/Utilities/Scripts/BoostScanDeps.cmake
+++ b/Utilities/Scripts/BoostScanDeps.cmake
@@ -139,6 +139,12 @@ function(_Boost_FIND_COMPONENT_DEPENDENCIES component includedir _ret_libs)
# hard dependency (handle as special-case for numpy).
continue()
endif()
+ if(component STREQUAL "nowide" AND
+ _boost_component_match STREQUAL "filesystem")
+ # Optional filesystem dependency; skip to avoid making it a
+ # hard dependency.
+ continue()
+ endif()
if (_boost_dep_found EQUAL -1 AND
NOT "${_boost_component_match}" STREQUAL "${component}")
list(APPEND _boost_DEPS "${_boost_component_match}")