summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCXXCompilerId.cpp.in
diff options
context:
space:
mode:
authorJustin LaPolla <jlapolla@cray.com>2020-12-01 16:42:06 (GMT)
committerBrad King <brad.king@kitware.com>2021-03-10 17:13:17 (GMT)
commit13144e82cdb29490ac34251b7c48a0260d4d54cf (patch)
tree0252fbf869f43c3a476dd3e2caf3161befffd30f /Modules/CMakeCXXCompilerId.cpp.in
parent214a06ec2ec567cd31aabdb3ada6421f965c5dfa (diff)
downloadCMake-13144e82cdb29490ac34251b7c48a0260d4d54cf.zip
CMake-13144e82cdb29490ac34251b7c48a0260d4d54cf.tar.gz
CMake-13144e82cdb29490ac34251b7c48a0260d4d54cf.tar.bz2
Cray: Enable Cray compiler wrapper detection on all platforms
Previously were checking for the `__CRAYXC` and `__CRAYXE` predefined macros. These macros reflect the platform that the compiler wrapper is running on, i.e. Cray XC and Cray XE machines. They are not defined on other platforms such as Apollo80. Switch to the `__CRAYXT_COMPUTE_LINUX_TARGET` macro. The Cray cc/CC/ftn wrappers always define this macro on the command line. This macro has been in use for many years, and is believed to be a reliable way to detect current and older Cray compiler wrappers. Fixes: #21904
Diffstat (limited to 'Modules/CMakeCXXCompilerId.cpp.in')
-rw-r--r--Modules/CMakeCXXCompilerId.cpp.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in
index a743ce7..d55d8b1 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(__CRAYXE) || defined(__CRAYXC)
+#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
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(__CRAYXE) || defined(__CRAYXC)
+#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
require += info_cray[argc];
#endif
require += info_language_dialect_default[argc];