endif()
reset_cmake_required()
endif() # DEAL_II_WITH_ZLIB
-
- if(${BOOST_VERSION} VERSION_LESS 1.74.0 AND DEAL_II_ALLOW_PLATFORM_INTROSPECTION)
- #
- # Test that Boost.Serialization is usable.
- #
- if(NOT DEFINED BOOST_SERIALIZATION_USABLE OR NOT ${BOOST_SERIALIZATION_USABLE})
- # Only run this check if it hasn't successfully run previously.
- message(STATUS "Performing Test BOOST_SERIALIZATION_USABLE")
-
- set(_binary_test_dir ${CMAKE_CURRENT_BINARY_DIR}/cmake/configure/TestBoostBugWorkdir)
-
- set(_flags "${DEAL_II_CXX_FLAGS}")
- strip_flag(_flags "-Werror")
-
- file(REMOVE_RECURSE ${_binary_test_dir})
- file(MAKE_DIRECTORY ${_binary_test_dir})
- execute_process(
- COMMAND ${CMAKE_COMMAND}
- -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
- -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
- "-DCMAKE_CXX_FLAGS=${_flags}"
- "-DCMAKE_EXE_LINKER_FLAGS=${DEAL_II_LINKER_FLAGS}"
- "-DCMAKE_SHARED_LINKER_FLAGS=${DEAL_II_LINKER_FLAGS}"
- "-DBOOST_INCLUDE_DIRS=${BOOST_INCLUDE_DIRS}"
- "-DBOOST_LIBRARIES=${BOOST_LIBRARIES}"
- ${CMAKE_CURRENT_SOURCE_DIR}/cmake/configure/TestBoostBug
- WORKING_DIRECTORY ${_binary_test_dir}
- RESULT_VARIABLE _result
- OUTPUT_QUIET
- ERROR_QUIET
- )
- if(${_result} EQUAL 0)
- execute_process(
- COMMAND ${CMAKE_COMMAND} --build . --target run
- WORKING_DIRECTORY ${_binary_test_dir}
- RESULT_VARIABLE _result
- OUTPUT_QUIET
- ERROR_QUIET
- )
- endif()
- if(${_result} EQUAL 0)
- message(STATUS "Performing Test BOOST_SERIALIZATION_USABLE - Success")
- set(BOOST_SERIALIZATION_USABLE TRUE CACHE INTERNAL "")
- else()
- message(STATUS "Performing Test BOOST_SERIALIZATION_USABLE - Failed")
- set(BOOST_SERIALIZATION_USABLE FALSE)
- endif()
- endif()
-
- if(NOT ${BOOST_SERIALIZATION_USABLE})
- message(STATUS
- "The externally provided Boost.Serialization library "
- "failed to pass a crucial test. \n"
- "Therefore, the bundled boost package is used. \n"
- "The configured testing project can be found at \n"
- "${_binary_test_dir}"
- )
- set(BOOST_ADDITIONAL_ERROR_STRING
- "The externally provided Boost.Serialization library "
- "failed to pass a crucial test."
- )
- set(${var} FALSE)
- endif()
- endif() # DEAL_II_ALLOW_PLATFORM_INTROSPECTION
endif()
endmacro()
#
#
-# We require at least boost 1.59.
-# - Boost::container::small_vector was introduced in 1.58 and some
-# serialization bugs in 1.58 were not fixed until 1.59.
+# We require at least boost 1.74.
#
-set(BOOST_VERSION_REQUIRED 1.59)
+set(BOOST_VERSION_REQUIRED 1.74)
set(BOOST_DIR "" CACHE PATH "An optional hint to a BOOST installation")
set_if_empty(BOOST_DIR "$ENV{BOOST_DIR}")