Преглед на файлове

IAR: Do not print compiler architecture id for non-IAR compilers

The compiler identification message was modified in commit ea83d0f8fb
(IAR: Generalize and add support for IAR RX compiler, 2019-04-05) to
include the architecture id since IAR compilers are arch-specific.
Revise the logic to avoid modifying the message for other compilers.
Brad King преди 6 години
родител
ревизия
4c0fb923b7
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 1 1
      Modules/CMakeDetermineASMCompiler.cmake
  2. 1 1
      Modules/CMakeDetermineCompilerId.cmake

+ 1 - 1
Modules/CMakeDetermineASMCompiler.cmake

@@ -145,7 +145,7 @@ if(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
   else()
     set(_version "")
   endif()
-  if(CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID)
+  if(CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID AND "x${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}" STREQUAL "xIAR")
     set(_archid " ${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}")
   else()
     set(_archid "")

+ 1 - 1
Modules/CMakeDetermineCompilerId.cmake

@@ -143,7 +143,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
     else()
       set(_version "")
     endif()
-    if(CMAKE_${lang}_COMPILER_ARCHITECTURE_ID)
+    if(CMAKE_${lang}_COMPILER_ARCHITECTURE_ID AND "x${CMAKE_${lang}_COMPILER_ID}" STREQUAL "xIAR")
       set(_archid " ${CMAKE_${lang}_COMPILER_ARCHITECTURE_ID}")
     else()
       set(_archid "")