summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeFortranCompilerId.F.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/CMakeFortranCompilerId.F.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/CMakeFortranCompilerId.F.in')
-rw-r--r--Modules/CMakeFortranCompilerId.F.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in
index 30f8d4c..6b51e38 100644
--- a/Modules/CMakeFortranCompilerId.F.in
+++ b/Modules/CMakeFortranCompilerId.F.in
@@ -108,7 +108,7 @@
#else
PRINT *, 'INFO:compiler[]'
#endif
-#if defined(__CRAYXE) || defined(__CRAYXC)
+#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
PRINT *, 'INFO:compiler_wrapper[CrayPrgEnv]'
#endif