Skip to content
Snippets Groups Projects
Commit 1c66012f authored by Lorenzo's avatar Lorenzo Committed by Brad King
Browse files

Compiler/IAR: search for both IAR's binaries * and *.exe

IAR is available for both Linux and Windows OSes.  Moreover,
binaries `*.exe` could be called from a Linux box, or vice versa.
See also commit 01a4eec4 (IAR: Changes required for Linux,
2019-04-25, v3.15.0-rc1~185^2).

Fixes: #22312
parent 91a90449
No related branches found
No related tags found
No related merge requests found
......@@ -20,19 +20,31 @@ if("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "A
string(TOLOWER "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" _archid_lower)
# Find linker
find_program(CMAKE_IAR_LINKER ilink${_archid_lower} HINTS ${__iar_hints}
find_program(CMAKE_IAR_LINKER
NAMES ilink${_archid_lower} ilink${_archid_lower}.exe
HINTS ${__iar_hints}
DOC "The IAR ILINK linker")
find_program(CMAKE_IAR_ARCHIVE iarchive HINTS ${__iar_hints}
find_program(CMAKE_IAR_ARCHIVE
NAMES iarchive iarchive.exe
HINTS ${__iar_hints}
DOC "The IAR archiver")
# Find utility tools
find_program(CMAKE_IAR_ELFTOOL ielftool HINTS ${__iar_hints}
find_program(CMAKE_IAR_ELFTOOL
NAMES ielftool ielftool.exe
HINTS ${__iar_hints}
DOC "The IAR ELF Tool")
find_program(CMAKE_IAR_ELFDUMP ielfdump${_archid_lower} HINTS ${__iar_hints}
find_program(CMAKE_IAR_ELFDUMP
NAMES ielfdump${_archid_lower} ielfdump${_archid_lower}.exe
HINTS ${__iar_hints}
DOC "The IAR ELF Dumper")
find_program(CMAKE_IAR_OBJMANIP iobjmanip HINTS ${__iar_hints}
find_program(CMAKE_IAR_OBJMANIP
NAMES iobjmanip iobjmanip.exe
HINTS ${__iar_hints}
DOC "The IAR ELF Object Tool")
find_program(CMAKE_IAR_SYMEXPORT isymexport HINTS ${__iar_hints}
find_program(CMAKE_IAR_SYMEXPORT
NAMES isymexport
HINTS ${__iar_hints}
DOC "The IAR Absolute Symbol Exporter")
mark_as_advanced(CMAKE_IAR_LINKER CMAKE_IAR_ARCHIVE CMAKE_IAR_ELFTOOL CMAKE_IAR_ELFDUMP CMAKE_IAR_OBJMANIP CMAKE_IAR_SYMEXPORT)
......@@ -51,9 +63,13 @@ elseif("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUA
"${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "8051")
# Find the "xlink" linker and "xar" archiver:
find_program(CMAKE_IAR_LINKER xlink HINTS ${__iar_hints}
find_program(CMAKE_IAR_LINKER
NAMES xlink xlink.exe
HINTS ${__iar_hints}
DOC "The IAR XLINK linker")
find_program(CMAKE_IAR_AR xar HINTS ${__iar_hints}
find_program(CMAKE_IAR_AR
NAMES xar xar.exe
HINTS ${__iar_hints}
DOC "The IAR archiver")
mark_as_advanced(CMAKE_IAR_LINKER CMAKE_IAR_AR)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment