mirror of
https://github.com/yaobinwen/CMake.git
synced 2026-01-12 15:45:49 +00:00
MSVC: Add support for C17
C17 support has been available in MSVC since VS 16.8. Fixes: #22816
This commit is contained in:
@ -15,6 +15,8 @@ if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 19.27)
|
||||
set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON)
|
||||
set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON)
|
||||
set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON)
|
||||
set(CMAKE_C17_STANDARD_COMPILE_OPTION "-std:c17")
|
||||
set(CMAKE_C17_EXTENSION_COMPILE_OPTION "-std:c17")
|
||||
else()
|
||||
# Special case for 19.27 (VS 16.7): C11 has partial support.
|
||||
macro(cmake_record_c_compile_features)
|
||||
|
||||
Reference in New Issue
Block a user