Cray: Add macro tests to detect the Cray compiler wrappers

This commit is contained in:
Chuck Atkins 2015-12-02 09:59:47 -06:00
parent 5eaac0c96a
commit 0763a83655
3 changed files with 17 additions and 0 deletions

View File

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

View File

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

View File

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