summaryrefslogtreecommitdiff
path: root/Modules/CMakeCCompilerId.c.in
diff options
context:
space:
mode:
authorRaul Tambre <raul@tambre.ee>2021-02-07 11:27:21 +0200
committerRaul Tambre <raul@tambre.ee>2021-02-25 18:22:07 +0200
commit7596d8b951e34c61b73e54a38cca86bdcf89dad8 (patch)
treee40bb87c19db86ce2ad28345e99918de915c810a /Modules/CMakeCCompilerId.c.in
parentc99db7153337865861ccb79c8f855d4d9f3539fc (diff)
downloadcmake-7596d8b951e34c61b73e54a38cca86bdcf89dad8.tar.gz
CMakeCCompilerId: Fix C standard detection in Clang MSVC mode
Clang doesn't define __STDC__ if in MSVC compatibility mode, but does define __STDC_VERSION__. Avoid the fallback for this combination.
Diffstat (limited to 'Modules/CMakeCCompilerId.c.in')
-rw-r--r--Modules/CMakeCCompilerId.c.in5
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in
index 8ba6abc7da..e6662b833a 100644
--- a/Modules/CMakeCCompilerId.c.in
+++ b/Modules/CMakeCCompilerId.c.in
@@ -33,9 +33,8 @@ char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
@CMAKE_C_COMPILER_ID_PLATFORM_CONTENT@
@CMAKE_C_COMPILER_ID_ERROR_FOR_TEST@
-#if !defined(__STDC__)
-# if (defined(_MSC_VER) && !defined(__clang__)) \
- || (defined(__ibmxl__) || defined(__IBMC__))
+#if !defined(__STDC__) && !defined(__clang__)
+# if defined(_MSC_VER) || defined(__ibmxl__) || defined(__IBMC__)
# define C_DIALECT "90"
# else
# define C_DIALECT