From 23b101de601491342f1b918ee29114d7f66d2ad9 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 8 Mar 2021 12:26:19 -0500 Subject: Revert "Cray: Fix Cray compiler detection on new platforms" The justification in commit 9ee4a42813 (Cray: Fix Cray compiler detection on new platforms, 2020-12-01, v3.19.2~26^2) confuses detection of the CrayPrgEnv with identification of the Cray compiler. The change regressed detection of the CrayPrgEnv on non-Cray compilers. Revert it pending further investigation into the original problem. Fixes: #21894 --- Modules/CMakeCCompilerId.c.in | 4 ++-- Modules/CMakeCXXCompilerId.cpp.in | 4 ++-- Modules/CMakeFortranCompilerId.F.in | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in index 8ba6abc..2f6bdb4 100644 --- a/Modules/CMakeCCompilerId.c.in +++ b/Modules/CMakeCCompilerId.c.in @@ -26,7 +26,7 @@ char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; char const* qnxnto = "INFO" ":" "qnxnto[]"; #endif -#if defined(_CRAYC) || defined(__cray__) +#if defined(__CRAYXE) || defined(__CRAYXC) char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; #endif @@ -77,7 +77,7 @@ int main(int argc, char* argv[]) #ifdef SIMULATE_VERSION_MAJOR require += info_simulate_version[argc]; #endif -#if defined(_CRAYC) || defined(__cray__) +#if defined(__CRAYXE) || defined(__CRAYXC) require += info_cray[argc]; #endif require += info_language_dialect_default[argc]; diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in index 672fff8..a743ce7 100644 --- a/Modules/CMakeCXXCompilerId.cpp.in +++ b/Modules/CMakeCXXCompilerId.cpp.in @@ -20,7 +20,7 @@ char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; char const* qnxnto = "INFO" ":" "qnxnto[]"; #endif -#if defined(_CRAYC) || defined(__cray__) +#if defined(__CRAYXE) || defined(__CRAYXC) char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; #endif @@ -76,7 +76,7 @@ int main(int argc, char* argv[]) #ifdef SIMULATE_VERSION_MAJOR require += info_simulate_version[argc]; #endif -#if defined(_CRAYC) || defined(__cray__) +#if defined(__CRAYXE) || defined(__CRAYXC) require += info_cray[argc]; #endif require += info_language_dialect_default[argc]; diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in index 7e8828b..30f8d4c 100644 --- a/Modules/CMakeFortranCompilerId.F.in +++ b/Modules/CMakeFortranCompilerId.F.in @@ -108,7 +108,7 @@ #else PRINT *, 'INFO:compiler[]' #endif -#if defined(_CRAYFTN) +#if defined(__CRAYXE) || defined(__CRAYXC) PRINT *, 'INFO:compiler_wrapper[CrayPrgEnv]' #endif -- cgit v0.12