From cca386b0a058c050a03c10bf1b9f1344aef7de3f Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 22 Aug 2012 11:31:33 -0400 Subject: [PATCH] Detect Cray compiler version with its id Decode decimal digits from _RELEASE _RELEASE_MINOR to compute version number components. See documentation at: http://docs.cray.com/books/S-2179-52/html-S-2179-52/zfixed5fvzxnxo.html http://sourceforge.net/p/predef/wiki/Compilers/#cray-c --- Modules/CMakeCCompilerId.c.in | 2 ++ Modules/CMakeCXXCompilerId.cpp.in | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in index d6e192d60f..f57a52a6e5 100644 --- a/Modules/CMakeCCompilerId.c.in +++ b/Modules/CMakeCCompilerId.c.in @@ -105,6 +105,8 @@ #elif defined(_CRAYC) # define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) #elif defined(__TI_COMPILER_VERSION__) # define COMPILER_ID "TI_DSP" diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in index a11996d3ed..a784ba8856 100644 --- a/Modules/CMakeCXXCompilerId.cpp.in +++ b/Modules/CMakeCXXCompilerId.cpp.in @@ -110,6 +110,8 @@ #elif defined(_CRAYC) # define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) #elif defined(__TI_COMPILER_VERSION__) # define COMPILER_ID "TI_DSP"