diff options
author | Raul Tambre <raul@tambre.ee> | 2021-02-07 10:08:16 (GMT) |
---|---|---|
committer | Raul Tambre <raul@tambre.ee> | 2021-02-25 16:22:32 (GMT) |
commit | c9f0613c2ace0714a48caf793889eedc605894ce (patch) | |
tree | 797cb8941c9222a9fbe9ab600feb1228af11ce1d /Modules/Compiler | |
parent | 10a72c0f1c5e7e57ac61ff1f8a73acdd6e159c06 (diff) | |
download | CMake-c9f0613c2ace0714a48caf793889eedc605894ce.zip CMake-c9f0613c2ace0714a48caf793889eedc605894ce.tar.gz CMake-c9f0613c2ace0714a48caf793889eedc605894ce.tar.bz2 |
GNU: C17 support
Added in commit c76dc9c32d616eff1e0ae162042f1c0f8ca65fbf, released in 8.1.
Set as default in the same commit.
Issue: #17755
Diffstat (limited to 'Modules/Compiler')
-rw-r--r-- | Modules/Compiler/GNU-C.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/Compiler/GNU-C.cmake b/Modules/Compiler/GNU-C.cmake index 86b4d83..4094717 100644 --- a/Modules/Compiler/GNU-C.cmake +++ b/Modules/Compiler/GNU-C.cmake @@ -36,4 +36,9 @@ elseif (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6) set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu1x") endif() -__compiler_check_default_language_standard(C 3.4 90 5.0 11) +if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 8.1) + set(CMAKE_C17_STANDARD_COMPILE_OPTION "-std=c17") + set(CMAKE_C17_EXTENSION_COMPILE_OPTION "-std=gnu17") +endif() + +__compiler_check_default_language_standard(C 3.4 90 5.0 11 8.1 17) |