From 6561b032bc995a248bc065690f0af6d98288ecea Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 28 Oct 2021 12:18:42 -0400 Subject: MSVC: Tolerate c_std_17 and c_std_23 features on older compiler versions MSVC `cl` versions prior to 19.27 had no `-std:c*` flags for C standards. List the `c_std_{17,23}` features anyway. This allows projects to at least attempt compilation with these compilers since they do not have any modes. --- 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 aca7995..8da0ced 100644 --- a/Modules/Compiler/MSVC-C.cmake +++ b/Modules/Compiler/MSVC-C.cmake @@ -49,6 +49,8 @@ else() c_std_90 c_std_99 c_std_11 + c_std_17 + c_std_23 c_function_prototypes ) list(APPEND CMAKE_C90_COMPILE_FEATURES c_std_90 c_function_prototypes) -- cgit v0.12