File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,24 @@ function(detect_supported_standards prefix lang)
2323 else ()
2424 set (${var_name} FALSE )
2525 endif ()
26+
27+
28+ if (standard EQUAL 17 AND
29+ (lang STREQUAL "CXX" OR lang STREQUAL "CUDA" ) AND
30+ ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND
31+ CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7) OR
32+ (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
33+ CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8)))
34+ # Special cases:
35+ # gcc < 7 and clang < 8 don't fully support C++17.
36+ # They accept the flag and have partial support, but nvcc will refuse
37+ # to enable it and falls back to the default dialect for the current
38+ # CXX compiler version. This breaks our CI.
39+ # CMake's COMPILE_FEATURES var reports that these compilers support C++17,
40+ # but we can't rely on it, so manually disable the dialect in these cases.
41+ set (${var_name} FALSE )
42+ endif ()
43+
2644 message (STATUS "Testing ${lang}${standard} Support: ${${var_name} }" )
2745 set (${var_name} ${${var_name} } PARENT_SCOPE)
2846 endforeach ()
You can’t perform that action at this time.
0 commit comments