diff options
author | Brad King <brad.king@kitware.com> | 2012-08-22 14:15:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-08-22 14:17:01 (GMT) |
commit | 952651c6428755f50a80d3b64a4e09d3bd1afc3b (patch) | |
tree | bd274dff5d69525567d72a2925183a08818471a6 /Modules/CMakeCXXCompilerId.cpp.in | |
parent | 74c57d99b4328c18b533d76e7f009e7daddc04df (diff) | |
download | CMake-952651c6428755f50a80d3b64a4e09d3bd1afc3b.zip CMake-952651c6428755f50a80d3b64a4e09d3bd1afc3b.tar.gz CMake-952651c6428755f50a80d3b64a4e09d3bd1afc3b.tar.bz2 |
Detect TI compiler version with its id
Decode decimal digits from __TI_COMPILER_VERSION__ to compute version
number components. See documentation at:
http://processors.wiki.ti.com/index.php/Refer_to_Compiler_Version_in_Your_Source
http://www.ti.com/general/docs/lit/getliterature.tsp?literatureNumber=spru187o
http://sourceforge.net/p/predef/wiki/Compilers/#texas-instruments-cc-compiler
Diffstat (limited to 'Modules/CMakeCXXCompilerId.cpp.in')
-rw-r--r-- | Modules/CMakeCXXCompilerId.cpp.in | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in index 80e6d19..acffbf4 100644 --- a/Modules/CMakeCXXCompilerId.cpp.in +++ b/Modules/CMakeCXXCompilerId.cpp.in @@ -110,6 +110,10 @@ #elif defined(__TI_COMPILER_VERSION__) # define COMPILER_ID "TI_DSP" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) #elif defined(__SCO_VERSION__) # define COMPILER_ID "SCO" |