mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 12:49:36 -06:00
Make the implementation for this compiler more complete. IAR has multiple C++ modes, historically they were reduced c++ versions for embedded that gradually improved to the full standard (which can be reduced again by e.g. disabling rtti and exceptions). The new implementation picks the best available, but the c++ mode can also be overridden by defining `CMAKE_IAR_CXX_FLAG`. Add C/C++ standard flags so that all modes up to and including the last supported standard are defined. Fixes: #16826
22 lines
911 B
CMake
22 lines
911 B
CMake
# This file is processed when the IAR compiler is used for an assembler file
|
|
|
|
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_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 "AVR")
|
|
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -S <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>")
|
|
__compiler_iar_AVR(ASM)
|
|
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s90;asm;msa)
|
|
|
|
endif()
|