diff options
author | Brad King <brad.king@kitware.com> | 2019-03-20 15:12:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-03-20 15:20:39 (GMT) |
commit | 8f8d056051824d0d0d4361f2b94f3afec52ecf0b (patch) | |
tree | 54dfaac39d615c8074908bc0ff2b931a26548052 /Modules/CMakeCompilerIdDetection.cmake | |
parent | bf02d625325535f485512eba307cff54c08bb257 (diff) | |
download | CMake-8f8d056051824d0d0d4361f2b94f3afec52ecf0b.zip CMake-8f8d056051824d0d0d4361f2b94f3afec52ecf0b.tar.gz CMake-8f8d056051824d0d0d4361f2b94f3afec52ecf0b.tar.bz2 |
ARMCC: Fix identification of ARM compiler when it defines GNU macros
According to ARMCC 5.06 documentation:
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0472m/chr1359125007083.html
the compiler may define `__GNUC__` in addition to `__ARMCC_VERSION`.
Re-order our preprocessor checks to consider the ARM-specific macro
first so that the ARM compiler is not mistaken for a GNU compiler.
Fixes: #19065
Diffstat (limited to 'Modules/CMakeCompilerIdDetection.cmake')
-rw-r--r-- | Modules/CMakeCompilerIdDetection.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeCompilerIdDetection.cmake b/Modules/CMakeCompilerIdDetection.cmake index 4d0c681..6a22d27 100644 --- a/Modules/CMakeCompilerIdDetection.cmake +++ b/Modules/CMakeCompilerIdDetection.cmake @@ -73,13 +73,13 @@ function(compiler_id_detection outvar lang) endif() list(APPEND ordered_compilers SCO + ARMCC AppleClang Clang GNU MSVC ADSP IAR - ARMCC ) if (lang STREQUAL C) list(APPEND ordered_compilers |