]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Prevent bundled boost from (dl)opening itself on Windows
authorMatthias Maier <tamiko@43-1.org>
Thu, 6 Aug 2015 20:18:39 +0000 (15:18 -0500)
committerMatthias Maier <tamiko@43-1.org>
Thu, 6 Aug 2015 20:22:50 +0000 (15:22 -0500)
cmake/configure/configure_boost.cmake

index 0460eaa7aba1378731d32ad748cc6ae9f8a067f1..d91c87a91b537e436422b5918191625640380049 100644 (file)
@@ -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()
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.