From c5cc4ddac4dfc376844a210b4cd25a01565b024d Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 28 Oct 2021 12:21:13 -0400 Subject: MSVC: Add support for C17 C17 support has been available in MSVC since VS 16.8. Fixes: #22816 --- Modules/Compiler/MSVC-C.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Modules/Compiler/MSVC-C.cmake b/Modules/Compiler/MSVC-C.cmake index 8da0ced..a53df46 100644 --- a/Modules/Compiler/MSVC-C.cmake +++ b/Modules/Compiler/MSVC-C.cmake @@ -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) -- cgit v0.12