From bf810c75ac1dd2302daf71538550134210d64b3c Mon Sep 17 00:00:00 2001 From: Jean-Marc Hengen Date: Wed, 7 Jul 2021 22:32:44 +0200 Subject: IAR: Use placeholders in linker and archiver rules Update the IAR linker and archiver rules to use the `` and `` placeholders instead of hard-coding the tool names. Fixes: #22395 --- Modules/Compiler/IAR.cmake | 14 +++++++------- 1 file 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 -o ") - set(CMAKE_${lang}_CREATE_STATIC_LIBRARY "\"${CMAKE_IAR_ARCHIVE}\" --create ") - set(CMAKE_${lang}_ARCHIVE_CREATE "\"${CMAKE_IAR_ARCHIVE}\" --create ") - set(CMAKE_${lang}_ARCHIVE_APPEND "\"${CMAKE_IAR_ARCHIVE}\" --replace ") + set(CMAKE_${lang}_LINK_EXECUTABLE " --silent -o ") + set(CMAKE_${lang}_CREATE_STATIC_LIBRARY " --create ") + set(CMAKE_${lang}_ARCHIVE_CREATE " --create ") + set(CMAKE_${lang}_ARCHIVE_APPEND " --replace ") 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 -o ") - set(CMAKE_${lang}_CREATE_STATIC_LIBRARY "\"${CMAKE_IAR_AR}\" ") - set(CMAKE_${lang}_ARCHIVE_CREATE "\"${CMAKE_IAR_AR}\" ") + set(CMAKE_${lang}_LINK_EXECUTABLE " -S -o ") + set(CMAKE_${lang}_CREATE_STATIC_LIBRARY " ") + set(CMAKE_${lang}_ARCHIVE_CREATE " ") set(CMAKE_${lang}_ARCHIVE_APPEND "") set(CMAKE_${lang}_ARCHIVE_FINISH "") -- cgit v0.12