⚗️ do not use too old compilers with C++17
This commit is contained in:
parent
5cd67e7d23
commit
12bb88871e
@ -54,7 +54,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// std::filesystem does not work on MinGW GCC 8: https://sourceforge.net/p/mingw-w64/bugs/737/
|
// std::filesystem does not work on MinGW GCC 8: https://sourceforge.net/p/mingw-w64/bugs/737/
|
||||||
#if __MINGW32__ && __GNUC__ == 8
|
#if defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ == 8
|
||||||
#undef JSON_STD_FILESYSTEM_EXPERIMENTAL
|
#undef JSON_STD_FILESYSTEM_EXPERIMENTAL
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -2342,7 +2342,7 @@ using is_detected_convertible =
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// std::filesystem does not work on MinGW GCC 8: https://sourceforge.net/p/mingw-w64/bugs/737/
|
// std::filesystem does not work on MinGW GCC 8: https://sourceforge.net/p/mingw-w64/bugs/737/
|
||||||
#if __MINGW32__ && __GNUC__ == 8
|
#if defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ == 8
|
||||||
#undef JSON_STD_FILESYSTEM_EXPERIMENTAL
|
#undef JSON_STD_FILESYSTEM_EXPERIMENTAL
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -58,6 +58,10 @@ foreach(feature ${CMAKE_CXX_COMPILE_FEATURES})
|
|||||||
set(compiler_supports_cpp_17 TRUE)
|
set(compiler_supports_cpp_17 TRUE)
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
# Clang only supports C++17 starting from Clang 5.0
|
||||||
|
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
|
||||||
|
unset(compiler_supports_cpp_17)
|
||||||
|
endif()
|
||||||
|
|
||||||
file(GLOB files src/unit-*.cpp)
|
file(GLOB files src/unit-*.cpp)
|
||||||
|
|
||||||
|
|||||||
@ -64,7 +64,7 @@ using ordered_json = nlohmann::ordered_json;
|
|||||||
#define JSON_STD_FILESYSTEM_EXPERIMENTAL 0
|
#define JSON_STD_FILESYSTEM_EXPERIMENTAL 0
|
||||||
|
|
||||||
// std::filesystem does not work on MinGW GCC 8: https://sourceforge.net/p/mingw-w64/bugs/737/
|
// std::filesystem does not work on MinGW GCC 8: https://sourceforge.net/p/mingw-w64/bugs/737/
|
||||||
#if __MINGW32__ && __GNUC__ == 8
|
#if defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ == 8
|
||||||
#undef JSON_STD_FILESYSTEM_EXPERIMENTAL
|
#undef JSON_STD_FILESYSTEM_EXPERIMENTAL
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user