diff options
author | Jean-Marc Hengen <jean-marc.hengen@zuehlke.com> | 2021-07-07 20:32:44 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-07-08 12:08:52 (GMT) |
commit | bf810c75ac1dd2302daf71538550134210d64b3c (patch) | |
tree | 3477f7f94d84b69d848d9ec8ae98f4f4ce48b64e /Modules/Compiler/IAR.cmake | |
parent | eb692af623379085169229fe5c2c9d3fba3a020d (diff) | |
download | CMake-bf810c75ac1dd2302daf71538550134210d64b3c.zip CMake-bf810c75ac1dd2302daf71538550134210d64b3c.tar.gz CMake-bf810c75ac1dd2302daf71538550134210d64b3c.tar.bz2 |
IAR: Use placeholders in linker and archiver rules
Update the IAR linker and archiver rules to use the `<CMAKE_LINKER>`
and `<CMAKE_AR>` placeholders instead of hard-coding the tool names.
Fixes: #22395
Diffstat (limited to 'Modules/Compiler/IAR.cmake')
-rw-r--r-- | Modules/Compiler/IAR.cmake | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Modules/Compiler/IAR.cmake b/Modules/Compiler/IAR.cmake index b8c0770..8bfc3ef 100644 --- a/Modules/Compiler/IAR.cmake +++ b/Modules/Compiler/IAR.cmake @@ -66,10 +66,10 @@ macro(__compiler_iar_ilink lang) string(APPEND CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT " -r -DNDEBUG") endif() - set(CMAKE_${lang}_LINK_EXECUTABLE "\"${CMAKE_IAR_LINKER}\" --silent <OBJECTS> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES> -o <TARGET>") - set(CMAKE_${lang}_CREATE_STATIC_LIBRARY "\"${CMAKE_IAR_ARCHIVE}\" <TARGET> --create <LINK_FLAGS> <OBJECTS>") - set(CMAKE_${lang}_ARCHIVE_CREATE "\"${CMAKE_IAR_ARCHIVE}\" <TARGET> --create <LINK_FLAGS> <OBJECTS>") - set(CMAKE_${lang}_ARCHIVE_APPEND "\"${CMAKE_IAR_ARCHIVE}\" <TARGET> --replace <LINK_FLAGS> <OBJECTS>") + set(CMAKE_${lang}_LINK_EXECUTABLE "<CMAKE_LINKER> --silent <OBJECTS> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES> -o <TARGET>") + set(CMAKE_${lang}_CREATE_STATIC_LIBRARY "<CMAKE_AR> <TARGET> --create <LINK_FLAGS> <OBJECTS>") + 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) @@ -102,9 +102,9 @@ macro(__compiler_iar_xlink lang) string(APPEND CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT " -r -DNDEBUG") endif() - set(CMAKE_${lang}_LINK_EXECUTABLE "\"${CMAKE_IAR_LINKER}\" -S <OBJECTS> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES> -o <TARGET>") - set(CMAKE_${lang}_CREATE_STATIC_LIBRARY "\"${CMAKE_IAR_AR}\" <TARGET> <LINK_FLAGS> <OBJECTS>") - set(CMAKE_${lang}_ARCHIVE_CREATE "\"${CMAKE_IAR_AR}\" <TARGET> <LINK_FLAGS> <OBJECTS>") + set(CMAKE_${lang}_LINK_EXECUTABLE "<CMAKE_LINKER> -S <OBJECTS> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES> -o <TARGET>") + set(CMAKE_${lang}_CREATE_STATIC_LIBRARY "<CMAKE_AR> <TARGET> <LINK_FLAGS> <OBJECTS>") + set(CMAKE_${lang}_ARCHIVE_CREATE "<CMAKE_AR> <TARGET> <LINK_FLAGS> <OBJECTS>") set(CMAKE_${lang}_ARCHIVE_APPEND "") set(CMAKE_${lang}_ARCHIVE_FINISH "") |