]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: TestBoostBug: Remove workaround
authorMatthias Maier <tamiko@43-1.org>
Mon, 18 Dec 2017 12:57:45 +0000 (06:57 -0600)
committerMatthias Maier <tamiko@43-1.org>
Mon, 18 Dec 2017 12:57:45 +0000 (06:57 -0600)
The workaround of renaming a list separator then passing a string
unquoted can be avoided by quoting the full option:

  "-DBOOST_LIBRARIES=${BOOST_LIBRARIES}"

cmake/configure/TestBoostBug/CMakeLists.txt
cmake/configure/configure_boost.cmake

index a57ad6432c12e55ad323ac1f659a48bbaea7e1c6..9e90a4cc3d0ec370793104f22afd71148b5f877e 100644 (file)
@@ -1,20 +1,13 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
 PROJECT(TestBoost)
 
-SET(BOOST_INCLUDE_DIRS CACHE STRING "The include paths for BOOST")
-SET(BOOST_LIBRARIES CACHE STRING "The BOOST libraries to use")
-
-# We assume the BOOST_LIBRARIES to be separated by '|'
-# This matches the change in the separator we do in
-# ../configure_boost.cmake
-STRING(REPLACE "|" ";" BOOST_LIBRARIES_SEPARATED ${BOOST_LIBRARIES})
 INCLUDE_DIRECTORIES(${BOOST_INCLUDE_DIRS})
 
 ADD_LIBRARY(derived SHARED polymorphic_derived2.cpp)
 ADD_EXECUTABLE(test_boost test_dll_exported.cpp)
 
-TARGET_LINK_LIBRARIES(derived ${BOOST_LIBRARIES_SEPARATED})
-TARGET_LINK_LIBRARIES(test_boost derived ${BOOST_LIBRARIES_SEPARATED})
+TARGET_LINK_LIBRARIES(derived ${BOOST_LIBRARIES})
+TARGET_LINK_LIBRARIES(test_boost derived ${BOOST_LIBRARIES})
 
 ADD_CUSTOM_TARGET(run
                   COMMAND test_boost
index b72ca3c97d7008e3f220350fa6533c595839e575..bc4982ebdcb7b5dac068ef3bc0b2f5d0cc92bf40 100644 (file)
@@ -137,20 +137,14 @@ MACRO(FEATURE_BOOST_FIND_EXTERNAL var)
     ENDIF()
 
     IF(${var} AND DEAL_II_ALLOW_PLATFORM_INTROSPECTION)
-      # We want to pass the libraries to the CMake project that tests for the
-      # BOOST Serialization bug. If we don't change the separator, only the
-      # first one is passed. This change in the separator is reverted in
-      # TestBoostBug/CMakeLists.txt
-      STRING (REPLACE ";" "|" BOOST_LIBRARIES_SEPARATED "${BOOST_LIBRARIES}")
-
       FILE(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/cmake/configure/TestBoostBug)
       FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cmake/configure/TestBoostBug)
       EXECUTE_PROCESS(
         COMMAND ${CMAKE_COMMAND}
                   -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
                   -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-                  -DBOOST_INCLUDE_DIRS=${BOOST_INCLUDE_DIRS}
-                  -DBOOST_LIBRARIES=${BOOST_LIBRARIES_SEPARATED}
+                  "-DBOOST_INCLUDE_DIRS=${BOOST_INCLUDE_DIRS}"
+                  "-DBOOST_LIBRARIES=${BOOST_LIBRARIES}"
                   ${CMAKE_CURRENT_SOURCE_DIR}/cmake/configure/TestBoostBug
                   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cmake/configure/TestBoostBug
         RESULT_VARIABLE _boost_serialization_usuable

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.