|
|
@@ -71,10 +71,20 @@ endmacro()
|
|
|
|
|
|
macro(_record_compiler_features_c std)
|
|
|
list(APPEND CMAKE_C${std}_COMPILE_FEATURES c_std_${std})
|
|
|
- _record_compiler_features(C "${CMAKE_C${std}_STANDARD_COMPILE_OPTION}" CMAKE_C${std}_COMPILE_FEATURES)
|
|
|
+
|
|
|
+ get_property(lang_level_has_features GLOBAL PROPERTY CMAKE_C${std}_KNOWN_FEATURES)
|
|
|
+ if(lang_level_has_features)
|
|
|
+ _record_compiler_features(C "${CMAKE_C${std}_STANDARD_COMPILE_OPTION}" CMAKE_C${std}_COMPILE_FEATURES)
|
|
|
+ endif()
|
|
|
+ unset(lang_level_has_features)
|
|
|
endmacro()
|
|
|
|
|
|
macro(_record_compiler_features_cxx std)
|
|
|
list(APPEND CMAKE_CXX${std}_COMPILE_FEATURES cxx_std_${std})
|
|
|
- _record_compiler_features(CXX "${CMAKE_CXX${std}_STANDARD_COMPILE_OPTION}" CMAKE_CXX${std}_COMPILE_FEATURES)
|
|
|
+
|
|
|
+ get_property(lang_level_has_features GLOBAL PROPERTY CMAKE_CXX${std}_KNOWN_FEATURES)
|
|
|
+ if(lang_level_has_features)
|
|
|
+ _record_compiler_features(CXX "${CMAKE_CXX${std}_STANDARD_COMPILE_OPTION}" CMAKE_CXX${std}_COMPILE_FEATURES)
|
|
|
+ endif()
|
|
|
+ unset(lang_level_has_features)
|
|
|
endmacro()
|