# This file is processed when the IAR compiler is used for a C file include(Compiler/IAR) set(CMAKE_C_COMPILE_OBJECT " -o ") set(CMAKE_C_CREATE_PREPROCESSED_SOURCE " --preprocess=cnl ") set(CMAKE_C_CREATE_ASSEMBLY_SOURCE " -lAH -o .dummy") # The toolchains for ARM and AVR are quite different: if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "ARM") set(CMAKE_C_LINK_EXECUTABLE " -o ") set(CMAKE_C_CREATE_STATIC_LIBRARY " --create ") endif() if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "AVR") set(CMAKE_C_OUTPUT_EXTENSION ".r90") if(NOT CMAKE_C_LINK_FLAGS) set(CMAKE_C_LINK_FLAGS "-Fmotorola") endif() set(CMAKE_C_LINK_EXECUTABLE " -o ") set(CMAKE_C_CREATE_STATIC_LIBRARY " -o ") endif() # add the target specific include directory: get_filename_component(_compilerDir "${CMAKE_C_COMPILER}" PATH) get_filename_component(_compilerDir "${_compilerDir}" PATH) include_directories("${_compilerDir}/inc" )