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>2020-12-01 17:20:47 (GMT)
commit9ee4a42813b10e541e17bc3b4e50dfd99f9dab14 (patch)
tree9532f43c1be602cbb0a46d8e41c1b834190c6656 /Modules/CMakeCXXCompilerId.cpp.in
parentf264f1d783d57c70a0864768b6b1aa44fc94194a (diff)
downloadCMake-9ee4a42813b10e541e17bc3b4e50dfd99f9dab14.zip
CMake-9ee4a42813b10e541e17bc3b4e50dfd99f9dab14.tar.gz
CMake-9ee4a42813b10e541e17bc3b4e50dfd99f9dab14.tar.bz2
Cray: Fix Cray compiler detection on new platforms
Customer reported problems detecting the Cray compiler on their Apollo80 system. We were checking for the __CRAYXC and __CRAYXE predefined macros. These macros reflect the platform that the compiler is running on, i.e. Cray XC and Cray XE machines. Naturally, this didn't work on Apollo80. This commit uses the official Cray compiler identification macros which are defined on every platform: CCE Version C Macro C++ Macro Fortran Macro ============ ======== ========= ============= version < 9 _CRAYC _CRAYC _CRAYFTN version >= 9 __cray__ __cray__ _CRAYFTN
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..672fff8 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(_CRAYC) || defined(__cray__)
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(_CRAYC) || defined(__cray__)
require += info_cray[argc];
#endif
require += info_language_dialect_default[argc];