summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-08-22 15:31:33 (GMT)
committerBrad King <brad.king@kitware.com>2012-08-22 15:31:33 (GMT)
commitcca386b0a058c050a03c10bf1b9f1344aef7de3f (patch)
treeab7d7e3b988bdc837a9cc63e6743ed8001f2771f
parent622d9a789dc72b159f7d571e3a700db5d090c1ef (diff)
downloadCMake-cca386b0a058c050a03c10bf1b9f1344aef7de3f.zip
CMake-cca386b0a058c050a03c10bf1b9f1344aef7de3f.tar.gz
CMake-cca386b0a058c050a03c10bf1b9f1344aef7de3f.tar.bz2
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
-rw-r--r--Modules/CMakeCCompilerId.c.in2
-rw-r--r--Modules/CMakeCXXCompilerId.cpp.in2
2 files changed, 4 insertions, 0 deletions
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in
index d6e192d..f57a52a 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 a11996d..a784ba8 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"