Skip to content
Snippets Groups Projects
Commit 31ecd371 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'iar-exe-suffix' into release-3.21


09bc0785 Help: Document CMAKE_EXECUTABLE_SUFFIX_<LANG> explicitly
05a3bafe Compiler/IAR: Avoid clobbering CMAKE_EXECUTABLE_SUFFIX

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !6357
parents e10c776e 09bc0785
No related branches found
No related tags found
No related merge requests found
......@@ -53,6 +53,7 @@ Variables that Provide Information
/variable/CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION
/variable/CMAKE_EDIT_COMMAND
/variable/CMAKE_EXECUTABLE_SUFFIX
/variable/CMAKE_EXECUTABLE_SUFFIX_LANG
/variable/CMAKE_EXTRA_GENERATOR
/variable/CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES
/variable/CMAKE_FIND_DEBUG_MODE
......
......@@ -6,4 +6,5 @@ The suffix for executables on this platform.
The suffix to use for the end of an executable filename if any, ``.exe``
on Windows.
``CMAKE_EXECUTABLE_SUFFIX_<LANG>`` overrides this for language ``<LANG>``.
:variable:`CMAKE_EXECUTABLE_SUFFIX_<LANG>` overrides this for
language ``<LANG>``.
CMAKE_EXECUTABLE_SUFFIX_<LANG>
------------------------------
The suffix to use for the end of an executable filename of ``<LANG>``
compiler target architecture, if any.
It overrides :variable:`CMAKE_EXECUTABLE_SUFFIX` for language ``<LANG>``.
......@@ -41,7 +41,7 @@
include_guard()
macro(__compiler_iar_ilink lang)
set(CMAKE_EXECUTABLE_SUFFIX ".elf")
set(CMAKE_EXECUTABLE_SUFFIX_${lang} ".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>")
......@@ -77,7 +77,7 @@ macro(__compiler_iar_ilink lang)
endmacro()
macro(__compiler_iar_xlink lang)
set(CMAKE_EXECUTABLE_SUFFIX ".bin")
set(CMAKE_EXECUTABLE_SUFFIX_${lang} ".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>")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment