From e13dd52535bd68c33106dfc9027ce15cabf68ccf Mon Sep 17 00:00:00 2001 From: Raul Tambre Date: Sun, 23 Jan 2022 23:08:44 +0200 Subject: XL: Detect default extensions mode for legacy compiler The legacy non-Clang variant seems to support a GNU-like extensions mode, which is the default. Enable detection for it. --- Modules/CMakeCCompilerId.c.in | 2 +- Modules/CMakeCXXCompilerId.cpp.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in index 30ad9824..0cb8724 100644 --- a/Modules/CMakeCCompilerId.c.in +++ b/Modules/CMakeCCompilerId.c.in @@ -61,7 +61,7 @@ const char* info_language_standard_default = const char* info_language_extensions_default = "INFO" ":" "extensions_default[" /* !defined(_MSC_VER) to exclude Clang's MSVC compatibility mode. */ -#if (defined(__clang__) || defined(__GNUC__) || \ +#if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) || \ defined(__TI_COMPILER_VERSION__)) && \ !defined(__STRICT_ANSI__) && !defined(_MSC_VER) "ON" diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in index e7a5487..4904249 100644 --- a/Modules/CMakeCXXCompilerId.cpp.in +++ b/Modules/CMakeCXXCompilerId.cpp.in @@ -67,7 +67,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. */ -#if (defined(__clang__) || defined(__GNUC__) || \ +#if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) || \ defined(__TI_COMPILER_VERSION__)) && \ !defined(__STRICT_ANSI__) && !defined(_MSC_VER) "ON" -- cgit v0.12