浏览代码

Cray: Add macro tests to detect the Cray compiler wrappers

Chuck Atkins 10 年之前
父节点
当前提交
0763a83655
共有 3 个文件被更改,包括 17 次插入0 次删除
  1. 7 0
      Modules/CMakeCCompilerId.c.in
  2. 7 0
      Modules/CMakeCXXCompilerId.cpp.in
  3. 3 0
      Modules/CMakeFortranCompilerId.F.in

+ 7 - 0
Modules/CMakeCCompilerId.c.in

@@ -21,6 +21,10 @@ char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
 char const* qnxnto = "INFO" ":" "qnxnto[]";
 #endif
 
+#if defined(__CRAYXE) || defined(__CRAYXC)
+char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
+#endif
+
 @CMAKE_C_COMPILER_ID_PLATFORM_CONTENT@
 @CMAKE_C_COMPILER_ID_ERROR_FOR_TEST@
 
@@ -54,6 +58,9 @@ int main(int argc, char* argv[])
 #endif
 #ifdef SIMULATE_VERSION_MAJOR
   require += info_simulate_version[argc];
+#endif
+#if defined(__CRAYXE) || defined(__CRAYXC)
+  require += info_cray[argc];
 #endif
   require += info_language_dialect_default[argc];
   (void)argv;

+ 7 - 0
Modules/CMakeCXXCompilerId.cpp.in

@@ -20,6 +20,10 @@ char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
 char const* qnxnto = "INFO" ":" "qnxnto[]";
 #endif
 
+#if defined(__CRAYXE) || defined(__CRAYXC)
+char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
+#endif
+
 @CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT@
 @CMAKE_CXX_COMPILER_ID_ERROR_FOR_TEST@
 
@@ -48,6 +52,9 @@ int main(int argc, char* argv[])
 #endif
 #ifdef SIMULATE_VERSION_MAJOR
   require += info_simulate_version[argc];
+#endif
+#if defined(__CRAYXE) || defined(__CRAYXC)
+  require += info_cray[argc];
 #endif
   require += info_language_dialect_default[argc];
   (void)argv;

+ 3 - 0
Modules/CMakeFortranCompilerId.F.in

@@ -110,6 +110,9 @@
 #       endif
         PRINT *, 'INFO:compiler[]'
 #endif
+#if defined(__CRAYXE) || defined(__CRAYXC)
+        PRINT *, 'INFO:compiler_wrapper[CrayPrgEnv]'
+#endif
 
 #if 0
 ! Identify the platform