diff --git a/cmake/CPM.cmake b/cmake/CPM.cmake index f3d79185..8f72e924 100644 --- a/cmake/CPM.cmake +++ b/cmake/CPM.cmake @@ -2,8 +2,8 @@ # # SPDX-FileCopyrightText: Copyright (c) 2019-2023 Lars Melchior and contributors -set (CPM_DOWNLOAD_VERSION 0.38.6) -set (CPM_HASH_SUM "11c3fa5f1ba14f15d31c2fb63dbc8628ee133d81c8d764caad9a8db9e0bacb07") +set (CPM_DOWNLOAD_VERSION 0.40.2) +set (CPM_HASH_SUM "c8cdc32c03816538ce22781ed72964dc864b2a34a310d3b7104812a5ca2d835d") if (CPM_SOURCE_CACHE) set (CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake") diff --git a/cmake/package-lock.cmake b/cmake/package-lock.cmake index 1f5fad30..1285de5a 100644 --- a/cmake/package-lock.cmake +++ b/cmake/package-lock.cmake @@ -14,14 +14,14 @@ CPMDeclarePackage (cereal SYSTEM TRUE OPTIONS "JUST_INSTALL_CEREAL ON") # simde -set (HIBF_SIMDE_VERSION 0.7.6) +set (HIBF_SIMDE_VERSION 0.8.2) CPMDeclarePackage (simde NAME simde VERSION ${HIBF_SIMDE_VERSION} DOWNLOAD_ONLY YES GITHUB_REPOSITORY simd-everywhere/simde) # benchmark -set (HIBF_BENCHMARK_VERSION 1.8.4) +set (HIBF_BENCHMARK_VERSION 1.9.0) CPMDeclarePackage (benchmark NAME benchmark VERSION ${HIBF_BENCHMARK_VERSION} @@ -29,15 +29,15 @@ CPMDeclarePackage (benchmark SYSTEM TRUE OPTIONS "BENCHMARK_ENABLE_TESTING OFF" "BENCHMARK_ENABLE_WERROR OFF") # googletest -set (HIBF_GOOGLETEST_VERSION 1.14.0) +set (HIBF_GOOGLETEST_VERSION 1.15.1) CPMDeclarePackage (googletest - NAME GTest + NAME googletest VERSION ${HIBF_GOOGLETEST_VERSION} GITHUB_REPOSITORY google/googletest SYSTEM TRUE OPTIONS "BUILD_GMOCK OFF" "INSTALL_GTEST OFF" "CMAKE_CXX_STANDARD 20") # doxygen-awesome -set (HIBF_DOXYGEN_AWESOME_VERSION 2.3.2) +set (HIBF_DOXYGEN_AWESOME_VERSION 2.3.3) CPMDeclarePackage (doxygen_awesome NAME doxygen_awesome VERSION ${HIBF_DOXYGEN_AWESOME_VERSION} diff --git a/test/hibf-test.cmake b/test/hibf-test.cmake index ab3b78f2..6427c312 100644 --- a/test/hibf-test.cmake +++ b/test/hibf-test.cmake @@ -43,11 +43,15 @@ enable_testing () if (NOT TARGET hibf::test) add_library (hibf_test INTERFACE) - # GCC12 and above: Disable warning about std::hardware_destructive_interference_size not being ABI-stable. if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + # Disable warning about std::hardware_destructive_interference_size not being ABI-stable. if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12) target_compile_options (hibf_test INTERFACE "-Wno-interference-size") endif () + # Warn about failed return value optimization. + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 14) + target_compile_options (hibf_test INTERFACE "-Wnrvo") + endif () endif () target_link_libraries (hibf_test INTERFACE "seqan::hibf") @@ -72,15 +76,6 @@ endif () # needed for unit test cases in hibf/test/unit if (NOT TARGET hibf::test::unit) add_library (hibf_test_unit INTERFACE) - - # GCC12 has some bogus warnings. They will not be fixed in googletest. - # https://github.com/google/googletest/issues/4232 - if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13) - target_compile_options (hibf_test INTERFACE "-Wno-restrict") - endif () - endif () - target_link_libraries (hibf_test_unit INTERFACE "hibf::test" "GTest::gtest_main") add_library (hibf::test::unit ALIAS hibf_test_unit) endif () diff --git a/test/include/hibf/test/type_name_as_string.hpp b/test/include/hibf/test/type_name_as_string.hpp index 4fdbdde0..919f8380 100644 --- a/test/include/hibf/test/type_name_as_string.hpp +++ b/test/include/hibf/test/type_name_as_string.hpp @@ -58,12 +58,15 @@ inline std::string const type_name_as_string = []() // itself, since the type is directly given by the compiler. // LCOV_EXCL_START if (status != 0) - return std::string{typeid(type).name()} + " (abi::__cxa_demangle error status (" + std::to_string(status) - + "): " - + (status == -1 ? "A memory allocation failure occurred." - : (status == -2 ? "mangled_name is not a valid name under the C++ ABI mangling rules." - : (status == -3 ? "One of the arguments is invalid." : "Unknown Error"))) - + ")"; + { + demangled_name = + std::string{typeid(type).name()} + " (abi::__cxa_demangle error status (" + std::to_string(status) + "): " + + (status == -1 ? "A memory allocation failure occurred." + : (status == -2 ? "mangled_name is not a valid name under the C++ ABI mangling rules." + : (status == -3 ? "One of the arguments is invalid." : "Unknown Error"))) + + ")"; + return demangled_name; + } // LCOV_EXCL_STOP demangled_name = std::string{std::addressof(*demangled_name_ptr)};