mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-25 10:18:34 -06:00
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
This commit is contained 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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user