# This file is processed when the IAR C/C++ Compiler is used # # CPU supported in CMake: 8051, Arm, AVR, MSP430, RH850, RISC-V, RL78, RX and V850 # # The compiler user documentation is architecture-dependent # and it can found with the product installation under /doc/{EW,BX}_DevelopmentGuide.ENU.pdf # # include_guard() macro(__compiler_iar_common lang) if (${lang} MATCHES "^(C|CXX)$") set(CMAKE_${lang}_COMPILE_OBJECT " ${CMAKE_IAR_${lang}_FLAG} --silent -o ") set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE " ${CMAKE_IAR_${lang}_FLAG} --silent --preprocess=cnl ") set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE " ${CMAKE_IAR_${lang}_FLAG} --silent -lAH -o .dummy") set(CMAKE_DEPFILE_FLAGS_${lang} "--dependencies=ns ") string(APPEND CMAKE_${lang}_FLAGS_INIT " ") string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -r") string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -Oh -DNDEBUG") string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Ohz -DNDEBUG") string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -Oh -r -DNDEBUG") endif() set(CMAKE_${lang}_RESPONSE_FILE_FLAG "-f ") set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "-f ") set(CMAKE_${lang}_ARCHIVE_FINISH "") endmacro() macro(__compiler_iar_ilink lang) set(CMAKE_EXECUTABLE_SUFFIX ".elf") set(CMAKE_${lang}_OUTPUT_EXTENSION ".o") __compiler_iar_common(${lang}) set(CMAKE_${lang}_LINK_EXECUTABLE " --silent -o ") set(CMAKE_${lang}_CREATE_STATIC_LIBRARY " --create ") set(CMAKE_${lang}_ARCHIVE_CREATE " --create ") set(CMAKE_${lang}_ARCHIVE_APPEND " --replace ") endmacro() macro(__compiler_iar_xlink lang) set(CMAKE_EXECUTABLE_SUFFIX ".bin") __compiler_iar_common(${lang}) set(CMAKE_${lang}_LINK_EXECUTABLE " -S -o ") set(CMAKE_${lang}_CREATE_STATIC_LIBRARY " ") set(CMAKE_${lang}_ARCHIVE_CREATE " ") set(CMAKE_${lang}_ARCHIVE_APPEND "") set(CMAKE_LIBRARY_PATH_FLAG "-I") endmacro()