From: Matthias Maier Date: Mon, 18 Dec 2017 12:57:45 +0000 (-0600) Subject: CMake: TestBoostBug: Remove workaround X-Git-Tag: v9.0.0-rc1~645^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=599d3a3db501512e5d768eae321381c62f4a9473;p=dealii.git CMake: TestBoostBug: Remove workaround The workaround of renaming a list separator then passing a string unquoted can be avoided by quoting the full option: "-DBOOST_LIBRARIES=${BOOST_LIBRARIES}" --- diff --git a/cmake/configure/TestBoostBug/CMakeLists.txt b/cmake/configure/TestBoostBug/CMakeLists.txt index a57ad6432c..9e90a4cc3d 100644 --- a/cmake/configure/TestBoostBug/CMakeLists.txt +++ b/cmake/configure/TestBoostBug/CMakeLists.txt @@ -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 diff --git a/cmake/configure/configure_boost.cmake b/cmake/configure/configure_boost.cmake index b72ca3c97d..bc4982ebdc 100644 --- a/cmake/configure/configure_boost.cmake +++ b/cmake/configure/configure_boost.cmake @@ -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