diff options
author | Juhani Simola <ext_juhani.simola@suunto.com> | 2016-01-30 18:54:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-02-03 19:35:06 (GMT) |
commit | 99a9c7e51a3980807c60a9ec7532db0ca9495e5f (patch) | |
tree | 55d1edebca05b71de440996727095614c79ea6d2 /Modules/Compiler | |
parent | a58abc69c23ef30fc2215eb72878af29f7e860fd (diff) | |
download | CMake-99a9c7e51a3980807c60a9ec7532db0ca9495e5f.zip CMake-99a9c7e51a3980807c60a9ec7532db0ca9495e5f.tar.gz CMake-99a9c7e51a3980807c60a9ec7532db0ca9495e5f.tar.bz2 |
IAR: Add support for using this compiler with the Ninja generator
The dependency flags require recent versions of `iccarm` and `iccavr`.
The multi-rule dependency generated with `--dependencies=m` does not
work well with Ninja, so use `--dependencies=ns` instead.
Diffstat (limited to 'Modules/Compiler')
-rw-r--r-- | Modules/Compiler/IAR-C.cmake | 3 | ||||
-rw-r--r-- | Modules/Compiler/IAR-CXX.cmake | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Modules/Compiler/IAR-C.cmake b/Modules/Compiler/IAR-C.cmake index d2c7df9..f1b6ff7 100644 --- a/Modules/Compiler/IAR-C.cmake +++ b/Modules/Compiler/IAR-C.cmake @@ -7,6 +7,9 @@ set(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <SOURCE> <DEFINES> <I set(CMAKE_C_CREATE_PREPROCESSED_SOURCE "<CMAKE_C_COMPILER> <SOURCE> <DEFINES> <INCLUDES> <FLAGS> --preprocess=cnl <PREPROCESSED_SOURCE>") set(CMAKE_C_CREATE_ASSEMBLY_SOURCE "<CMAKE_C_COMPILER> <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -lAH <ASSEMBLY_SOURCE> -o <OBJECT>.dummy") +set(CMAKE_C_RESPONSE_FILE_LINK_FLAG "-f") +set(CMAKE_DEPFILE_FLAGS_C "--dependencies=ns <DEPFILE>") + # The toolchains for ARM and AVR are quite different: if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "ARM") diff --git a/Modules/Compiler/IAR-CXX.cmake b/Modules/Compiler/IAR-CXX.cmake index 03ecdf1..ffb144f 100644 --- a/Modules/Compiler/IAR-CXX.cmake +++ b/Modules/Compiler/IAR-CXX.cmake @@ -7,7 +7,8 @@ set(CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <SOURCE> <DEFINES> <INCLUDES 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") - +set(CMAKE_CXX_RESPONSE_FILE_LINK_FLAG "-f") +set(CMAKE_DEPFILE_FLAGS_CXX "--dependencies=ns <DEPFILE>") if("${IAR_TARGET_ARCHITECTURE}" STREQUAL "ARM") |