diff options
author | Raul Tambre <raul@tambre.ee> | 2021-02-06 16:54:13 (GMT) |
---|---|---|
committer | Raul Tambre <raul@tambre.ee> | 2021-02-25 16:22:10 (GMT) |
commit | 93b7d3d29221f98388c7fa20568cd0b769a26774 (patch) | |
tree | 389c3bf8cd1e2a9cc03f431874d16448eee9fe1d /Modules/CMakeDetermineCompileFeatures.cmake | |
parent | 58d9525233e4ffca1c7edc7a5978770a0e4ec36d (diff) | |
download | CMake-93b7d3d29221f98388c7fa20568cd0b769a26774.zip CMake-93b7d3d29221f98388c7fa20568cd0b769a26774.tar.gz CMake-93b7d3d29221f98388c7fa20568cd0b769a26774.tar.bz2 |
C17 support
Implements #17755.
Diffstat (limited to 'Modules/CMakeDetermineCompileFeatures.cmake')
-rw-r--r-- | Modules/CMakeDetermineCompileFeatures.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCompileFeatures.cmake b/Modules/CMakeDetermineCompileFeatures.cmake index c03a85f..49b8169 100644 --- a/Modules/CMakeDetermineCompileFeatures.cmake +++ b/Modules/CMakeDetermineCompileFeatures.cmake @@ -10,6 +10,7 @@ function(cmake_determine_compile_features lang) set(CMAKE_C90_COMPILE_FEATURES) set(CMAKE_C99_COMPILE_FEATURES) set(CMAKE_C11_COMPILE_FEATURES) + set(CMAKE_C17_COMPILE_FEATURES) include("${CMAKE_ROOT}/Modules/Internal/FeatureTesting.cmake") @@ -20,6 +21,9 @@ function(cmake_determine_compile_features lang) return() endif() + if (CMAKE_C11_COMPILE_FEATURES AND CMAKE_C17_COMPILE_FEATURES) + list(REMOVE_ITEM CMAKE_C17_COMPILE_FEATURES ${CMAKE_C11_COMPILE_FEATURES}) + endif() if (CMAKE_C99_COMPILE_FEATURES AND CMAKE_C11_COMPILE_FEATURES) list(REMOVE_ITEM CMAKE_C11_COMPILE_FEATURES ${CMAKE_C99_COMPILE_FEATURES}) endif() @@ -32,6 +36,7 @@ function(cmake_determine_compile_features lang) ${CMAKE_C90_COMPILE_FEATURES} ${CMAKE_C99_COMPILE_FEATURES} ${CMAKE_C11_COMPILE_FEATURES} + ${CMAKE_C17_COMPILE_FEATURES} ) endif() @@ -39,6 +44,7 @@ function(cmake_determine_compile_features lang) set(CMAKE_C90_COMPILE_FEATURES ${CMAKE_C90_COMPILE_FEATURES} PARENT_SCOPE) set(CMAKE_C99_COMPILE_FEATURES ${CMAKE_C99_COMPILE_FEATURES} PARENT_SCOPE) set(CMAKE_C11_COMPILE_FEATURES ${CMAKE_C11_COMPILE_FEATURES} PARENT_SCOPE) + set(CMAKE_C17_COMPILE_FEATURES ${CMAKE_C17_COMPILE_FEATURES} PARENT_SCOPE) message(CHECK_PASS "done") |