diff options
author | Brad King <brad.king@kitware.com> | 2021-07-20 15:55:25 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-07-20 15:56:01 (GMT) |
commit | 31ecd3718047874b5eeb939e9608fa1bd386c1a7 (patch) | |
tree | 47e4ed45d8b76ff6a626c9b6aee90a0508413ab8 | |
parent | e10c776e58769080d3d9eb8c4206efdd18f0f0e9 (diff) | |
parent | 09bc0785eeae95e23f9ac5c2e945fa89cb994912 (diff) | |
download | CMake-31ecd3718047874b5eeb939e9608fa1bd386c1a7.zip CMake-31ecd3718047874b5eeb939e9608fa1bd386c1a7.tar.gz CMake-31ecd3718047874b5eeb939e9608fa1bd386c1a7.tar.bz2 |
Merge topic 'iar-exe-suffix' into release-3.21
09bc0785ee Help: Document CMAKE_EXECUTABLE_SUFFIX_<LANG> explicitly
05a3bafe65 Compiler/IAR: Avoid clobbering CMAKE_EXECUTABLE_SUFFIX
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6357
-rw-r--r-- | Help/manual/cmake-variables.7.rst | 1 | ||||
-rw-r--r-- | Help/variable/CMAKE_EXECUTABLE_SUFFIX.rst | 3 | ||||
-rw-r--r-- | Help/variable/CMAKE_EXECUTABLE_SUFFIX_LANG.rst | 7 | ||||
-rw-r--r-- | Modules/Compiler/IAR.cmake | 4 |
4 files changed, 12 insertions, 3 deletions
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 39fbbed..9cea0fb 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -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 diff --git a/Help/variable/CMAKE_EXECUTABLE_SUFFIX.rst b/Help/variable/CMAKE_EXECUTABLE_SUFFIX.rst index 356590f..bc4b9df 100644 --- a/Help/variable/CMAKE_EXECUTABLE_SUFFIX.rst +++ b/Help/variable/CMAKE_EXECUTABLE_SUFFIX.rst @@ -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>``. diff --git a/Help/variable/CMAKE_EXECUTABLE_SUFFIX_LANG.rst b/Help/variable/CMAKE_EXECUTABLE_SUFFIX_LANG.rst new file mode 100644 index 0000000..a68150e --- /dev/null +++ b/Help/variable/CMAKE_EXECUTABLE_SUFFIX_LANG.rst @@ -0,0 +1,7 @@ +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>``. diff --git a/Modules/Compiler/IAR.cmake b/Modules/Compiler/IAR.cmake index 8bfc3ef..a6b436a 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 ".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>") |