Here is a possible patch. With this patch it builds both on testing (googletest 1.11.0) and unstable (googletest 1.12.1).
The patch need some tweaks to be upstreamable since it used the Debian path to the googletest source. Mattias
diff -ur seqan3-3.2.0+ds.orig/test/unit/test/CMakeLists.txt seqan3-3.2.0+ds/test/unit/test/CMakeLists.txt --- seqan3-3.2.0+ds.orig/test/unit/test/CMakeLists.txt 2022-06-20 13:58:01.000000000 +0000 +++ seqan3-3.2.0+ds/test/unit/test/CMakeLists.txt 2022-07-08 12:24:37.678861725 +0000 @@ -1,3 +1,17 @@ +include (CheckCXXSourceCompiles) + +set (CMAKE_REQUIRED_INCLUDES /usr/src/googletest/googletest/include) + +check_cxx_source_compiles (" +#include <gtest/gtest.h> +decltype(testing::internal::Nullopt()) x(); +int main() {} +" GTEST_HAS_NULLOPT) + +if (GTEST_HAS_NULLOPT) +add_definitions (-DGTEST_HAS_NULLOPT) +endif() + seqan3_test (expect_range_eq_test.cpp) seqan3_test (expect_same_type_test.cpp) seqan3_test (file_access_test.cpp) diff -ur seqan3-3.2.0+ds.orig/test/unit/test/pretty_printing_test.cpp seqan3-3.2.0+ds/test/unit/test/pretty_printing_test.cpp --- seqan3-3.2.0+ds.orig/test/unit/test/pretty_printing_test.cpp 2022-06-20 13:58:01.000000000 +0000 +++ seqan3-3.2.0+ds/test/unit/test/pretty_printing_test.cpp 2022-07-08 12:24:37.678861725 +0000 @@ -67,7 +67,11 @@ EXPECT_EQ(gtest_str(std::vector<std::vector<int>>{{0, 1}, {2, 3}, {1, 2}, {0}}), "[[0,1],[2,3],[1,2],[0]]"s); EXPECT_EQ(debug_str(std::vector<std::vector<int>>{{0, 1}, {2, 3}, {1, 2}, {0}}), "[[0,1],[2,3],[1,2],[0]]"s); +#ifdef GTEST_HAS_NULLOPT + EXPECT_EQ(gtest_str(std::nullopt), "(nullopt)"s); +#else EXPECT_EQ(gtest_str(std::nullopt), "<VALUELESS_OPTIONAL>"s); +#endif EXPECT_EQ(debug_str(std::nullopt), "<VALUELESS_OPTIONAL>"s); }
signature.asc
Description: This is a digitally signed message part