mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-01 03:11:08 -06:00
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
This commit is contained in:
@@ -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_${lang}_COMPILER> ${CMAKE_IAR_${lang}_FLAG} --silent <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>")
|
||||
@@ -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_${lang}_COMPILER> ${CMAKE_IAR_${lang}_FLAG} --silent <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>")
|
||||
|
||||
Reference in New Issue
Block a user