diff options
author | Joakim Andersson <Joakim.Andersson@nordicsemi.no> | 2015-10-26 13:51:09 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-11-02 18:45:24 (GMT) |
commit | 035a658f4fdc8028ff19568aa2ded8b3efa70909 (patch) | |
tree | 133d05ec37b5f5b2632111186d0bc0a52aabdc3b /Modules/Compiler/ARMCC-DetermineCompiler.cmake | |
parent | 74ea66850c99578d7d1665e64579279a6ff89896 (diff) | |
download | CMake-035a658f4fdc8028ff19568aa2ded8b3efa70909.zip CMake-035a658f4fdc8028ff19568aa2ded8b3efa70909.tar.gz CMake-035a658f4fdc8028ff19568aa2ded8b3efa70909.tar.bz2 |
Add support for the ARM Compiler (arm.com)
Create an `ARMCC` compiler id corresponding to compilers identified and
versioned by the `__ARMCC_VERSION` predefined macro. See documentation
for the compilers at
http://infocenter.arm.com/help/topic/com.arm.doc.set.swdev/index.html
Diffstat (limited to 'Modules/Compiler/ARMCC-DetermineCompiler.cmake')
-rw-r--r-- | Modules/Compiler/ARMCC-DetermineCompiler.cmake | 16 |
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 0000000..a3667d7 --- /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 +") |