From 9254e7ddf2d3be2dd97fb30ae79cf3fe1fbbda2a Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Tue, 21 Sep 2021 07:41:57 +0200 Subject: IAR: Use same executable suffix as try_compile There was a mismatch in the executable suffix between the compiler detection and try_compile. This resulted in the generated executable having a different suffix than what try_compile was looking for. The IAR module is changed to use the same suffix as try_compile. Fixes: #22567 --- Modules/Compiler/IAR.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/Compiler/IAR.cmake b/Modules/Compiler/IAR.cmake index 2200a21..dc48cda 100644 --- a/Modules/Compiler/IAR.cmake +++ b/Modules/Compiler/IAR.cmake @@ -41,7 +41,7 @@ include_guard() macro(__compiler_iar_ilink lang) - set(CMAKE_EXECUTABLE_SUFFIX_${lang} ".elf") + set(CMAKE_EXECUTABLE_SUFFIX ".elf") set(CMAKE_${lang}_OUTPUT_EXTENSION ".o") if (${lang} STREQUAL "C" OR ${lang} STREQUAL "CXX") set(CMAKE_${lang}_COMPILE_OBJECT " ${CMAKE_IAR_${lang}_FLAG} --silent -o ") @@ -74,7 +74,7 @@ macro(__compiler_iar_ilink lang) endmacro() macro(__compiler_iar_xlink lang) - set(CMAKE_EXECUTABLE_SUFFIX_${lang} ".bin") + set(CMAKE_EXECUTABLE_SUFFIX ".bin") if (${lang} STREQUAL "C" OR ${lang} STREQUAL "CXX") set(CMAKE_${lang}_COMPILE_OBJECT " ${CMAKE_IAR_${lang}_FLAG} --silent -o ") -- cgit v0.12