diff options
author | Chuck Atkins <chuck.atkins@kitware.com> | 2015-12-02 15:59:47 (GMT) |
---|---|---|
committer | Chuck Atkins <chuck.atkins@kitware.com> | 2015-12-07 16:09:15 (GMT) |
commit | 0763a8365528166747746e3b94e74ca98d0d705f (patch) | |
tree | 8dce8cd073a5fb7cb50376d73f58bb7581091430 | |
parent | 5eaac0c96ac51e1300664ef37239f3215bb58489 (diff) | |
download | CMake-0763a8365528166747746e3b94e74ca98d0d705f.zip CMake-0763a8365528166747746e3b94e74ca98d0d705f.tar.gz CMake-0763a8365528166747746e3b94e74ca98d0d705f.tar.bz2 |
Cray: Add macro tests to detect the Cray compiler wrappers
-rw-r--r-- | Modules/CMakeCCompilerId.c.in | 7 | ||||
-rw-r--r-- | Modules/CMakeCXXCompilerId.cpp.in | 7 | ||||
-rw-r--r-- | Modules/CMakeFortranCompilerId.F.in | 3 |
3 files changed, 17 insertions, 0 deletions
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in index 63f8787..5bfe0fd 100644 --- a/Modules/CMakeCCompilerId.c.in +++ b/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@ @@ -55,6 +59,9 @@ int main(int argc, char* argv[]) #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; return require; diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in index 61cd790..3e5c0fc 100644 --- a/Modules/CMakeCXXCompilerId.cpp.in +++ b/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@ @@ -49,6 +53,9 @@ int main(int argc, char* argv[]) #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; return require; diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in index 2f7f40e..67cda3b 100644 --- a/Modules/CMakeFortranCompilerId.F.in +++ b/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 |