CMake detect Cray PE
Cray PE
Programming Environment
allows easy switching of compilers for
developing
and running applications on Cray supercomputers.
Use the Cray compiler wrappers cc, CC, and ftn instead of directly referencing the compiler backends gcc, g++, and gfortran.
In CMake script, detect if Cray PE is being used, regardless of compiler backend by detecting if environment variable CRAYPE_VERSION is set.
if(DEFINED ENV{CRAYPE_VERSION})
message("Cray PE detected")
endif()