From 041af50512ba635b4b252c17a8494f27ce99745f Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Tue, 17 Nov 2026 17:19:51 +0100 Subject: [PATCH] Skip the std::filesystem test section on libstdc++ 8 libstdc++ 8 needs -lstdc++fs, which clang on that library does not get from the test options (clang 10 link error in ci_test_compilers_clang). Signed-off-by: Niels Lohmann --- tests/src/unit-to_json-rvalue.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/src/unit-to_json-rvalue.cpp b/tests/src/unit-to_json-rvalue.cpp index 7d27cf0c0..98993e014 100644 --- a/tests/src/unit-to_json-rvalue.cpp +++ b/tests/src/unit-to_json-rvalue.cpp @@ -32,7 +32,9 @@ using nlohmann::json; // JSON_HAS_CPP_17 (do not remove; see note at top of file) #if (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) - #if __has_include() + // libstdc++ 8 needs -lstdc++fs for std::filesystem (GCC bug 90050), which clang on such a + // libstdc++ does not get from the test options + #if __has_include() && (!defined(_GLIBCXX_RELEASE) || _GLIBCXX_RELEASE >= 9) #include #define TO_JSON_RVALUE_HAS_FS 1 #endif