summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/IAR-ASM.cmake
diff options
context:
space:
mode:
authorStefan Andersson <tfosm@hotmail.com>2019-04-05 09:50:59 (GMT)
committerStefan Andersson <tfosm@hotmail.com>2019-04-12 07:10:02 (GMT)
commitea83d0f8fb8fd6806c4d5f32e0392638ddc3b65e (patch)
tree1640a28ff8cc7d50d7a043decb5c948e918e563a /Modules/Compiler/IAR-ASM.cmake
parent52fb35bd69ec2fa1a5307695cb22c3f125debf4f (diff)
downloadCMake-ea83d0f8fb8fd6806c4d5f32e0392638ddc3b65e.zip
CMake-ea83d0f8fb8fd6806c4d5f32e0392638ddc3b65e.tar.gz
CMake-ea83d0f8fb8fd6806c4d5f32e0392638ddc3b65e.tar.bz2
IAR: Generalize and add support for IAR RX compiler
Moved common ASM setup to the common macros and changed version check.
Diffstat (limited to 'Modules/Compiler/IAR-ASM.cmake')
-rw-r--r--Modules/Compiler/IAR-ASM.cmake17
1 files changed, 8 insertions, 9 deletions
diff --git a/Modules/Compiler/IAR-ASM.cmake b/Modules/Compiler/IAR-ASM.cmake
index e12bfd1..f9c0ced 100644
--- a/Modules/Compiler/IAR-ASM.cmake
+++ b/Modules/Compiler/IAR-ASM.cmake
@@ -3,21 +3,20 @@
include(Compiler/IAR)
if("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM")
-set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -S <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>")
- __compiler_iar_ARM(ASM)
+ set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -S <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>")
+ __compiler_iar_ilink(ASM)
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;asm;msa)
- string(APPEND CMAKE_ASM_FLAGS_INIT " ")
- string(APPEND CMAKE_ASM_FLAGS_DEBUG_INIT " -r")
- string(APPEND CMAKE_ASM_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
- string(APPEND CMAKE_ASM_FLAGS_RELEASE_INIT " -DNDEBUG")
- string(APPEND CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT " -r -DNDEBUG")
+elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "RX")
+ set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> --silent <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>")
+ __compiler_iar_ilink(ASM)
+ set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;asm;msa)
elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR")
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -S <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>")
- __compiler_iar_AVR(ASM)
+ __compiler_iar_xlink(ASM)
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s90;asm;msa)
else()
- message(FATAL_ERROR "CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID not detected as \"AVR\" or \"ARM\". This should be automatic.")
+ message(FATAL_ERROR "CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID not detected. This should be automatic.")
endif()