Commit e4707048 authored by Islam Amer's avatar Islam Amer Committed by Brad King

IAR: FindBinUtils should work for CXX as well as C

The IAR compiler test works when a project specifies LANGUAGES C CXX
but fails if CXX comes before C. This change makes it work regardless
of the order.
parent 7746fdb2
Pipeline #84795 passed with stage
......@@ -10,7 +10,7 @@ get_filename_component(__iar_hint_2 "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPI
set(__iar_hints "${__iar_hint_1}" "${__iar_hint_2}")
if("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM")
if("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM")
# could allow using normal binutils ar, since objects are normal ELF files?
find_program(CMAKE_IAR_LINKARM ilinkarm.exe HINTS ${__iar_hints}
DOC "The IAR ARM linker")
......@@ -38,7 +38,7 @@ set(CMAKE_IAR_LINKARM \"${CMAKE_IAR_LINKARM}\")
")
elseif("${CMAKE_C_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR")
elseif("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR")
# For AVR and AVR32, IAR uses the "xlink" linker and the "xar" archiver:
find_program(CMAKE_IAR_LINKER xlink.exe HINTS ${__iar_hints}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment