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
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