summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-11-23 15:00:31 (GMT)
committerBrad King <brad.king@kitware.com>2021-11-23 15:00:31 (GMT)
commit0fc8b2f61cf36b7fcc2524028aabc35ba8b8bad9 (patch)
tree66968f9b785e800f279109465914a6167d3fa8a8 /Modules
parentb414cd35871f09d26cd8a65fbc6457de485ecc10 (diff)
downloadCMake-0fc8b2f61cf36b7fcc2524028aabc35ba8b8bad9.zip
CMake-0fc8b2f61cf36b7fcc2524028aabc35ba8b8bad9.tar.gz
CMake-0fc8b2f61cf36b7fcc2524028aabc35ba8b8bad9.tar.bz2
CompilerId: Restore support for classic C by avoiding C++ style comments
C++ style comments were added by commit fc3a1cbdd8 (CompilerID: Compiler extensions default detection, 2021-05-29, v3.22.0-rc1~52^2~2), but they may not be supported by the default mode of some C compilers. Use C-style comments instead. For consistency, do this for all languages. Fixes: #22942
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeCCompilerId.c.in2
-rw-r--r--Modules/CMakeCUDACompilerId.cu.in2
-rw-r--r--Modules/CMakeCXXCompilerId.cpp.in2
3 files changed, 3 insertions, 3 deletions
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in
index 43ede3e..30ad9824 100644
--- a/Modules/CMakeCCompilerId.c.in
+++ b/Modules/CMakeCCompilerId.c.in
@@ -60,7 +60,7 @@ const char* info_language_standard_default =
"INFO" ":" "standard_default[" C_VERSION "]";
const char* info_language_extensions_default = "INFO" ":" "extensions_default["
-// !defined(_MSC_VER) to exclude Clang's MSVC compatibility mode.
+/* !defined(_MSC_VER) to exclude Clang's MSVC compatibility mode. */
#if (defined(__clang__) || defined(__GNUC__) || \
defined(__TI_COMPILER_VERSION__)) && \
!defined(__STRICT_ANSI__) && !defined(_MSC_VER)
diff --git a/Modules/CMakeCUDACompilerId.cu.in b/Modules/CMakeCUDACompilerId.cu.in
index bc685a7..becb9b4 100644
--- a/Modules/CMakeCUDACompilerId.cu.in
+++ b/Modules/CMakeCUDACompilerId.cu.in
@@ -33,7 +33,7 @@ const char* info_language_standard_default = "INFO" ":" "standard_default["
"]";
const char* info_language_extensions_default = "INFO" ":" "extensions_default["
-// !defined(_MSC_VER) to exclude Clang's MSVC compatibility mode.
+/* !defined(_MSC_VER) to exclude Clang's MSVC compatibility mode. */
#if (defined(__clang__) || defined(__GNUC__)) && !defined(__STRICT_ANSI__) && \
!defined(_MSC_VER)
"ON"
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in
index cdf9c18..e7a5487 100644
--- a/Modules/CMakeCXXCompilerId.cpp.in
+++ b/Modules/CMakeCXXCompilerId.cpp.in
@@ -66,7 +66,7 @@ const char* info_language_standard_default = "INFO" ":" "standard_default["
"]";
const char* info_language_extensions_default = "INFO" ":" "extensions_default["
-// !defined(_MSC_VER) to exclude Clang's MSVC compatibility mode.
+/* !defined(_MSC_VER) to exclude Clang's MSVC compatibility mode. */
#if (defined(__clang__) || defined(__GNUC__) || \
defined(__TI_COMPILER_VERSION__)) && \
!defined(__STRICT_ANSI__) && !defined(_MSC_VER)