2012-01-05 00:29:11 +04:00
|
|
|
# This file is processed when the IAR compiler is used for a C++ file
|
|
|
|
|
|
|
|
include(Compiler/IAR)
|
|
|
|
|
2015-07-13 17:35:04 +03:00
|
|
|
set(CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>")
|
2012-01-05 00:29:11 +04:00
|
|
|
|
2015-07-13 17:35:04 +03:00
|
|
|
set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE "<CMAKE_CXX_COMPILER> <SOURCE> <DEFINES> <INCLUDES> <FLAGS> --preprocess=cnl <PREPROCESSED_SOURCE>")
|
|
|
|
set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE "<CMAKE_CXX_COMPILER> <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -lAH <ASSEMBLY_SOURCE> -o <OBJECT>.dummy")
|
2012-01-05 00:29:11 +04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "ARM")
|
|
|
|
|
|
|
|
set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_LINKER> <OBJECTS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES> -o <TARGET>")
|
|
|
|
set(CMAKE_CXX_CREATE_STATIC_LIBRARY "<CMAKE_AR> <TARGET> --create <LINK_FLAGS> <OBJECTS> ")
|
|
|
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "AVR")
|
|
|
|
set(CMAKE_CXX_OUTPUT_EXTENSION ".r90")
|
|
|
|
if(NOT CMAKE_CXX_LINK_FLAGS)
|
|
|
|
set(CMAKE_CXX_LINK_FLAGS "-Fmotorola")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_LINKER> <OBJECTS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES> -o <TARGET>")
|
|
|
|
set(CMAKE_CXX_CREATE_STATIC_LIBRARY "<CMAKE_AR> -o <TARGET> <OBJECTS> ")
|
|
|
|
|
|
|
|
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")
|