summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-07-23 13:27:20 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-07-23 13:27:28 (GMT)
commit76fa10133de5aed0fdc405121020f4691ddd4dac (patch)
tree6f8cc74d655e65a9dba8e31cbf4188da44d1c0c4 /Modules/Compiler
parentf7a3031b7defbc805a39a8b23dbefe10764d956b (diff)
parent5b9bfe738cfa96ca12ca82506f234aae787965e9 (diff)
downloadCMake-76fa10133de5aed0fdc405121020f4691ddd4dac.zip
CMake-76fa10133de5aed0fdc405121020f4691ddd4dac.tar.gz
CMake-76fa10133de5aed0fdc405121020f4691ddd4dac.tar.bz2
Merge topic 'iar-binutils'
5b9bfe738c IAR: Moved search logic to BinUtils. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6372
Diffstat (limited to 'Modules/Compiler')
-rw-r--r--Modules/Compiler/IAR-FindBinUtils.cmake80
-rw-r--r--Modules/Compiler/IAR.cmake6
2 files changed, 0 insertions, 86 deletions
diff --git a/Modules/Compiler/IAR-FindBinUtils.cmake b/Modules/Compiler/IAR-FindBinUtils.cmake
deleted file mode 100644
index 01f6d22..0000000
--- a/Modules/Compiler/IAR-FindBinUtils.cmake
+++ /dev/null
@@ -1,80 +0,0 @@
-if(NOT DEFINED _CMAKE_PROCESSING_LANGUAGE OR _CMAKE_PROCESSING_LANGUAGE STREQUAL "")
- message(FATAL_ERROR "Internal error: _CMAKE_PROCESSING_LANGUAGE is not set")
-endif()
-
-# Try to find tools in the same directory as the compiler itself
-get_filename_component(__iar_hint_1 "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER}" REALPATH)
-get_filename_component(__iar_hint_1 "${__iar_hint_1}" DIRECTORY)
-
-get_filename_component(__iar_hint_2 "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER}" DIRECTORY)
-
-set(__iar_hints "${__iar_hint_1}" "${__iar_hint_2}")
-
-if("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM" OR
- "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "RX" OR
- "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "RH850" OR
- "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "RL78" OR
- "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "RISCV" OR
- "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "STM8")
-
- string(TOLOWER "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" _archid_lower)
-
- # Find linker
- 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
- NAMES iarchive iarchive.exe
- HINTS ${__iar_hints}
- DOC "The IAR archiver")
-
- # Find utility tools
- find_program(CMAKE_IAR_ELFTOOL
- NAMES ielftool ielftool.exe
- HINTS ${__iar_hints}
- DOC "The IAR ELF Tool")
- 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
- NAMES iobjmanip iobjmanip.exe
- HINTS ${__iar_hints}
- DOC "The IAR ELF Object Tool")
- 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)
-
- set(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_CUSTOM_CODE
-"set(CMAKE_IAR_LINKER \"${CMAKE_IAR_LINKER}\")
-set(CMAKE_IAR_ARCHIVE \"${CMAKE_IAR_ARCHIVE}\")
-set(CMAKE_IAR_ELFTOOL \"${CMAKE_IAR_ELFTOOL}\")
-set(CMAKE_IAR_ELFDUMP \"${CMAKE_IAR_ELFDUMP}\")
-set(CMAKE_IAR_OBJMANIP \"${CMAKE_IAR_OBJMANIP}\")
-set(CMAKE_IAR_LINKER \"${CMAKE_IAR_LINKER}\")
-")
-
-elseif("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR" OR
- "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430" OR
- "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850" OR
- "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "8051")
-
- # Find the "xlink" linker and "xar" archiver:
- find_program(CMAKE_IAR_LINKER
- NAMES xlink xlink.exe
- HINTS ${__iar_hints}
- DOC "The IAR XLINK linker")
- 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)
-
- set(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_CUSTOM_CODE
-"set(CMAKE_IAR_LINKER \"${CMAKE_IAR_LINKER}\")
-set(CMAKE_IAR_AR \"${CMAKE_IAR_AR}\")
-")
-endif()
diff --git a/Modules/Compiler/IAR.cmake b/Modules/Compiler/IAR.cmake
index a6b436a..2200a21 100644
--- a/Modules/Compiler/IAR.cmake
+++ b/Modules/Compiler/IAR.cmake
@@ -71,9 +71,6 @@ macro(__compiler_iar_ilink lang)
set(CMAKE_${lang}_ARCHIVE_CREATE "<CMAKE_AR> <TARGET> --create <LINK_FLAGS> <OBJECTS>")
set(CMAKE_${lang}_ARCHIVE_APPEND "<CMAKE_AR> <TARGET> --replace <LINK_FLAGS> <OBJECTS>")
set(CMAKE_${lang}_ARCHIVE_FINISH "")
-
- set(CMAKE_LINKER "${CMAKE_IAR_LINKER}" CACHE FILEPATH "The IAR linker" FORCE)
- set(CMAKE_AR "${CMAKE_IAR_ARCHIVE}" CACHE FILEPATH "The IAR archiver" FORCE)
endmacro()
macro(__compiler_iar_xlink lang)
@@ -109,7 +106,4 @@ macro(__compiler_iar_xlink lang)
set(CMAKE_${lang}_ARCHIVE_FINISH "")
set(CMAKE_LIBRARY_PATH_FLAG "-I")
-
- set(CMAKE_LINKER "${CMAKE_IAR_LINKER}" CACHE FILEPATH "The IAR linker" FORCE)
- set(CMAKE_AR "${CMAKE_IAR_AR}" CACHE FILEPATH "The IAR archiver" FORCE)
endmacro()