diff options
author | Brad King <brad.king@kitware.com> | 2023-05-16 14:44:00 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-05-16 14:44:23 (GMT) |
commit | 20c7219f8fc1475043e08ec64e40583b45126f58 (patch) | |
tree | e99c5ffc4a151e91e8e70a7efad9e83a45ccb45a | |
parent | 76cc81f0fe192bd50ec02eae5c60041480f98ff7 (diff) | |
parent | cfec4c1c5e63eb78811aeb5e5f605b6c3a7d8400 (diff) | |
download | CMake-20c7219f8fc1475043e08ec64e40583b45126f58.zip CMake-20c7219f8fc1475043e08ec64e40583b45126f58.tar.gz CMake-20c7219f8fc1475043e08ec64e40583b45126f58.tar.bz2 |
Merge topic 'iar-align-output-extension'
cfec4c1c5e IAR: Enforce output extension for xlink targets
7fec8f993b IAR: Replace extension for compiler and assembler
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8477
-rw-r--r-- | Modules/Compiler/IAR-ASM.cmake | 4 | ||||
-rw-r--r-- | Modules/Compiler/IAR-CXX.cmake | 5 | ||||
-rw-r--r-- | Modules/Compiler/IAR.cmake | 1 |
3 files changed, 8 insertions, 2 deletions
diff --git a/Modules/Compiler/IAR-ASM.cmake b/Modules/Compiler/IAR-ASM.cmake index 4c0025c..5f1dac0 100644 --- a/Modules/Compiler/IAR-ASM.cmake +++ b/Modules/Compiler/IAR-ASM.cmake @@ -38,22 +38,26 @@ elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR") __assembler_iar_deps("-y" 8) set(_CMAKE_IAR_SILENCER_FLAG " -S") set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s90;asm;msa) + set(CMAKE_ASM_OUTPUT_EXTENSION ".r90") elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430") __compiler_iar_xlink(ASM) __assembler_iar_deps("-y" 8) set(_CMAKE_IAR_SILENCER_FLAG " -S") set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s43;asm;msa) + set(CMAKE_ASM_OUTPUT_EXTENSION ".r43") elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850") __compiler_iar_xlink(ASM) set(_CMAKE_IAR_SILENCER_FLAG " -S") set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s85;asm;msa) + set(CMAKE_ASM_OUTPUT_EXTENSION ".r85") elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "8051") __compiler_iar_xlink(ASM) set(_CMAKE_IAR_SILENCER_FLAG " -S") set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s51;asm;msa) + set(CMAKE_ASM_OUTPUT_EXTENSION ".r51") elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "STM8") __compiler_iar_ilink(ASM) diff --git a/Modules/Compiler/IAR-CXX.cmake b/Modules/Compiler/IAR-CXX.cmake index 3f0ef1f..cea5e7e 100644 --- a/Modules/Compiler/IAR-CXX.cmake +++ b/Modules/Compiler/IAR-CXX.cmake @@ -69,6 +69,7 @@ elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "RISCV") elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR") __compiler_iar_xlink(CXX) __compiler_check_default_language_standard(CXX 7.10 98) + set(CMAKE_CXX_OUTPUT_EXTENSION ".r90") elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430") __compiler_iar_xlink(CXX) @@ -78,12 +79,12 @@ elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430") elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850") __compiler_iar_xlink(CXX) __compiler_check_default_language_standard(CXX 1.10 98) - set(CMAKE_C_OUTPUT_EXTENSION ".r85") + set(CMAKE_CXX_OUTPUT_EXTENSION ".r85") elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "8051") __compiler_iar_xlink(CXX) __compiler_check_default_language_standard(CXX 6.10 98) - set(CMAKE_C_OUTPUT_EXTENSION ".r51") + set(CMAKE_CXX_OUTPUT_EXTENSION ".r51") elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "STM8") __compiler_iar_ilink(CXX) diff --git a/Modules/Compiler/IAR.cmake b/Modules/Compiler/IAR.cmake index 32a7b3f5..8dadb76 100644 --- a/Modules/Compiler/IAR.cmake +++ b/Modules/Compiler/IAR.cmake @@ -23,6 +23,7 @@ macro(__compiler_iar_common lang) string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -Oh -r -DNDEBUG") endif() + set(CMAKE_${lang}_OUTPUT_EXTENSION_REPLACE 1) set(CMAKE_${lang}_RESPONSE_FILE_FLAG "-f ") set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "-f ") |