From 7fec8f993b1a1b1bb5bc7d8e7fe2e9c5e95e1f27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20L=C3=B6nnberg?= Date: Mon, 8 May 2023 15:35:53 +0200 Subject: IAR: Replace extension for compiler and assembler --- Modules/Compiler/IAR.cmake | 1 + 1 file changed, 1 insertion(+) 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 ") -- cgit v0.12 From cfec4c1c5e63eb78811aeb5e5f605b6c3a7d8400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20L=C3=B6nnberg?= Date: Fri, 12 May 2023 13:58:32 +0200 Subject: IAR: Enforce output extension for xlink targets --- Modules/Compiler/IAR-ASM.cmake | 4 ++++ Modules/Compiler/IAR-CXX.cmake | 5 +++-- 2 files changed, 7 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) -- cgit v0.12