summaryrefslogtreecommitdiffstats
path: root/Modules/FindBoost.cmake
diff options
context:
space:
mode:
authorNeroBurner <pyro4hell@gmail.com>2019-03-11 07:48:20 (GMT)
committerBrad King <brad.king@kitware.com>2019-03-11 17:24:51 (GMT)
commit05774d4b5845d0b7cbdd1985922b3351a4ebb39d (patch)
treeab17569f1641143c95cdffbccdec3f622dcb8352 /Modules/FindBoost.cmake
parent7a30d72728b9334e18205dc65cf4419efdcfba34 (diff)
downloadCMake-05774d4b5845d0b7cbdd1985922b3351a4ebb39d.zip
CMake-05774d4b5845d0b7cbdd1985922b3351a4ebb39d.tar.gz
CMake-05774d4b5845d0b7cbdd1985922b3351a4ebb39d.tar.bz2
FindBoost: always define BOOST_ALL_DYN_LINK for Boost::dynamic_linking
The purpose of the `Boost::dynamic_linking` interface library is to cause `BOOST_ALL_DYN_LINK` to be defined. Do this on all platforms instead of just Windows. In particular, using Boost::log trivial_logger requires to set BOOST_ALL_NO_LIB when Boost::Log is compiled as dynamic library. Fixes: #17813
Diffstat (limited to 'Modules/FindBoost.cmake')
-rw-r--r--Modules/FindBoost.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 7882c4b..6e7d3db 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -1201,6 +1201,8 @@ if(NOT TARGET Boost::diagnostic_definitions)
add_library(Boost::diagnostic_definitions INTERFACE IMPORTED)
add_library(Boost::disable_autolinking INTERFACE IMPORTED)
add_library(Boost::dynamic_linking INTERFACE IMPORTED)
+ set_target_properties(Boost::dynamic_linking PROPERTIES
+ INTERFACE_COMPILE_DEFINITIONS "BOOST_ALL_DYN_LINK")
endif()
if(WIN32)
# In windows, automatic linking is performed, so you do not have
@@ -1225,8 +1227,6 @@ if(WIN32)
INTERFACE_COMPILE_DEFINITIONS "BOOST_LIB_DIAGNOSTIC")
set_target_properties(Boost::disable_autolinking PROPERTIES
INTERFACE_COMPILE_DEFINITIONS "BOOST_ALL_NO_LIB")
- set_target_properties(Boost::dynamic_linking PROPERTIES
- INTERFACE_COMPILE_DEFINITIONS "BOOST_ALL_DYN_LINK")
endif()
_Boost_CHECK_SPELLING(Boost_ROOT)