Skip to content
Snippets Groups Projects
Commit eeaa8901 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'msvc_c11' into release-3.18


f4373fed Tests: Fix RunCMake.try_compile test for C standards with MSVC 19.27

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !5145
parents 281a87f8 f4373fed
No related merge requests found
......@@ -363,6 +363,15 @@ function(add_RunCMake_test_try_compile)
unset(CMAKE_CXX_STANDARD_DEFAULT)
endif()
endif()
if(CMAKE_VERSION VERSION_LESS 3.18.20200813 AND "x${CMAKE_C_COMPILER_ID}" STREQUAL "xMSVC")
# Older CMake versions do not know about MSVC language standards.
# Approximate our logic from MSVC-C.cmake.
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 19.27)
set(CMAKE_C_STANDARD_DEFAULT 99)
else()
set(CMAKE_C_STANDARD_DEFAULT "")
endif()
endif()
foreach(var
CMAKE_SYSTEM_NAME
CMAKE_C_COMPILER_ID
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment