mirror of
https://github.com/nlohmann/json.git
synced 2026-11-17 17:01:30 +00:00
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 <mail@nlohmann.me>
This commit is contained in:
1 file changed
+3
-1
@@ -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(<filesystem>)
|
||||
// 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(<filesystem>) && (!defined(_GLIBCXX_RELEASE) || _GLIBCXX_RELEASE >= 9)
|
||||
#include <filesystem>
|
||||
#define TO_JSON_RVALUE_HAS_FS 1
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user