summaryrefslogtreecommitdiff
path: root/Modules/Compiler/ARMCC-DetermineCompiler.cmake
diff options
context:
space:
mode:
authorMyungJoo Ham <myungjoo.ham@samsung.com>2017-10-11 15:16:57 +0900
committerMyungJoo Ham <myungjoo.ham@samsung.com>2017-10-11 15:16:57 +0900
commit915c76ded744c0f5f151402b9fa69f3fd8452573 (patch)
treeca6a387466543248890f346847acaa8343989b22 /Modules/Compiler/ARMCC-DetermineCompiler.cmake
parent317dbdb79761ef65e45c7358cfc7571c6afa54ad (diff)
downloadcmake-915c76ded744c0f5f151402b9fa69f3fd8452573.tar.gz
cmake-915c76ded744c0f5f151402b9fa69f3fd8452573.tar.bz2
cmake-915c76ded744c0f5f151402b9fa69f3fd8452573.zip
Imported Upstream version 3.9.4upstream/3.9.4
Diffstat (limited to 'Modules/Compiler/ARMCC-DetermineCompiler.cmake')
-rw-r--r--Modules/Compiler/ARMCC-DetermineCompiler.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/Modules/Compiler/ARMCC-DetermineCompiler.cmake b/Modules/Compiler/ARMCC-DetermineCompiler.cmake
new file mode 100644
index 000000000..a3667d7c2
--- /dev/null
+++ b/Modules/Compiler/ARMCC-DetermineCompiler.cmake
@@ -0,0 +1,16 @@
+# ARMCC Toolchain
+set(_compiler_id_pp_test "defined(__ARMCC_VERSION)")
+
+set(_compiler_id_version_compute "
+#if __ARMCC_VERSION >= 1000000
+ /* __ARMCC_VERSION = VRRPPPP */
+ # define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__ARMCC_VERSION/1000000)
+ # define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__ARMCC_VERSION/10000 % 100)
+ # define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__ARMCC_VERSION % 10000)
+#else
+ /* __ARMCC_VERSION = VRPPPP */
+ # define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__ARMCC_VERSION/100000)
+ # define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__ARMCC_VERSION/10000 % 10)
+ # define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__ARMCC_VERSION % 10000)
+#endif
+")