1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-16 22:37:30 +08:00
Files
CMake/Modules/Compiler/ARMCC-DetermineCompiler.cmake
Brad King f28e7fc1a5 ARMCC: Do not identify ARMClang as ARMCC
Since commit 8f8d056051 (ARMCC: Fix identification of ARM compiler when
it defines GNU macros, 2019-03-20, v3.14.1~10^2) we consider ARMCC
before Clang or GNU compilers.  Since armclang also defines
`__ARMCC_VERSION` it is now mistaken for ARMCC.  Extend the check for
ARMCC to also verify that `__clang__` is not defined.

Issue: #19065
2019-04-03 12:50:10 -04:00

17 lines
731 B
CMake

# ARMCC Toolchain
set(_compiler_id_pp_test "defined(__ARMCC_VERSION) && !defined(__clang__)")
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
")