summaryrefslogtreecommitdiff
path: root/Modules/CMakeCCompilerId.c.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-08-22 10:15:58 -0400
committerBrad King <brad.king@kitware.com>2012-08-22 10:17:01 -0400
commit952651c6428755f50a80d3b64a4e09d3bd1afc3b (patch)
treebd274dff5d69525567d72a2925183a08818471a6 /Modules/CMakeCCompilerId.c.in
parent74c57d99b4328c18b533d76e7f009e7daddc04df (diff)
downloadcmake-952651c6428755f50a80d3b64a4e09d3bd1afc3b.tar.gz
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/CMakeCCompilerId.c.in')
-rw-r--r--Modules/CMakeCCompilerId.c.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in
index 8b5b899a75..331be069e5 100644
--- a/Modules/CMakeCCompilerId.c.in
+++ b/Modules/CMakeCCompilerId.c.in
@@ -108,6 +108,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(__TINYC__)
# define COMPILER_ID "TinyCC"