summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/MSVC-C-FeatureTests.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-03-28 14:56:58 (GMT)
committerBrad King <brad.king@kitware.com>2018-03-29 14:40:13 (GMT)
commita53cf69022e57d859864d59b9c03238f180cb400 (patch)
treeccdf77c39e894283afbeba71eeaf8e3dd78f4bfa /Modules/Compiler/MSVC-C-FeatureTests.cmake
parente62dfeccb1bb6a86a85f34908343a89f6d02ee6a (diff)
downloadCMake-a53cf69022e57d859864d59b9c03238f180cb400.zip
CMake-a53cf69022e57d859864d59b9c03238f180cb400.tar.gz
CMake-a53cf69022e57d859864d59b9c03238f180cb400.tar.bz2
Features: Record C features for MSVC
The MSVC C compiler has no notion of C language standards or flags. Tell CMake to assume that all language standards are available. Record available C language features depending on the version of the compiler. Fixes: #17858
Diffstat (limited to 'Modules/Compiler/MSVC-C-FeatureTests.cmake')
-rw-r--r--Modules/Compiler/MSVC-C-FeatureTests.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/Compiler/MSVC-C-FeatureTests.cmake b/Modules/Compiler/MSVC-C-FeatureTests.cmake
new file mode 100644
index 0000000..3f09be2
--- /dev/null
+++ b/Modules/Compiler/MSVC-C-FeatureTests.cmake
@@ -0,0 +1,8 @@
+set(_cmake_oldestSupported "_MSC_VER >= 1600")
+
+# Not yet supported:
+#set(_cmake_feature_test_c_static_assert "")
+#set(_cmake_feature_test_c_restrict "")
+
+set(_cmake_feature_test_c_variadic_macros "${_cmake_oldestSupported}")
+set(_cmake_feature_test_c_function_prototypes "${_cmake_oldestSupported}")