From: Matthias Maier Date: Thu, 6 Aug 2015 20:18:39 +0000 (-0500) Subject: CMake: Prevent bundled boost from (dl)opening itself on Windows X-Git-Tag: v8.4.0-rc2~657^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41def393e21f9e9fb7c4cebc92f48948a1bdf421;p=dealii.git CMake: Prevent bundled boost from (dl)opening itself on Windows --- diff --git a/cmake/configure/configure_boost.cmake b/cmake/configure/configure_boost.cmake index 0460eaa7ab..d91c87a91b 100644 --- a/cmake/configure/configure_boost.cmake +++ b/cmake/configure/configure_boost.cmake @@ -35,6 +35,16 @@ MACRO(FEATURE_BOOST_CONFIGURE_BUNDLED) ENABLE_IF_SUPPORTED(BOOST_CXX_FLAGS "-Wno-unused-local-typedefs") SET(BOOST_BUNDLED_INCLUDE_DIRS ${BOOST_FOLDER}/include) + + IF(CMAKE_SYSTEM_NAME MATCHES "Windows") + # + # Bundled boost tries to (dl)open itself as a dynamic library on + # Windows. Disable this undesired behavior by exporting + # BOOST_ALL_NO_LIB on Windows platforms (for bundled boost). + # + LIST(APPEND BOOST_DEFINITIONS "BOOST_ALL_NO_LIB") + LIST(APPEND BOOST_USER_DEFINITIONS "BOOST_ALL_NO_LIB") + ENDIF() ENDMACRO()