From aec40e7630f35c79e72d5fdfe85503196e041b62 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Tue, 28 Jan 2025 13:42:01 -0600 Subject: [PATCH] CMake: simply require boost 1.74 or later, remove compatibility check --- cmake/configure/configure_20_boost.cmake | 64 ------------------------ cmake/modules/FindDEAL_II_BOOST.cmake | 6 +-- 2 files changed, 2 insertions(+), 68 deletions(-) diff --git a/cmake/configure/configure_20_boost.cmake b/cmake/configure/configure_20_boost.cmake index fa612d4975..b74f6530f1 100644 --- a/cmake/configure/configure_20_boost.cmake +++ b/cmake/configure/configure_20_boost.cmake @@ -79,70 +79,6 @@ macro(feature_boost_find_external var) 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() diff --git a/cmake/modules/FindDEAL_II_BOOST.cmake b/cmake/modules/FindDEAL_II_BOOST.cmake index e2c2cfa087..1fbe664ec3 100644 --- a/cmake/modules/FindDEAL_II_BOOST.cmake +++ b/cmake/modules/FindDEAL_II_BOOST.cmake @@ -27,11 +27,9 @@ # # -# 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}") -- 2.39.5