summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-10-28 16:18:42 (GMT)
committerBrad King <brad.king@kitware.com>2021-10-28 16:27:00 (GMT)
commit6561b032bc995a248bc065690f0af6d98288ecea (patch)
tree567b953f61b97d0c992c24face2370b10682f707 /Modules/Compiler
parent22f804e0ec1f827a11396394206e2cd5834e5522 (diff)
downloadCMake-6561b032bc995a248bc065690f0af6d98288ecea.zip
CMake-6561b032bc995a248bc065690f0af6d98288ecea.tar.gz
CMake-6561b032bc995a248bc065690f0af6d98288ecea.tar.bz2
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.
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/MSVC-C.cmake2
1 files changed, 2 insertions, 0 deletions
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)