diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Compiler/IAR-C.cmake | 3 | ||||
-rw-r--r-- | Modules/Compiler/IAR-CXX.cmake | 3 | ||||
-rw-r--r-- | Modules/ExternalProject.cmake | 19 |
3 files changed, 22 insertions, 3 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") diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 7070dc4..249658d 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -1231,7 +1231,22 @@ function(_ep_get_build_command name step cmd_var) endif() set(args --build ".") if(CMAKE_CONFIGURATION_TYPES) - list(APPEND args --config $<CONFIG>) + if (CMAKE_CFG_INTDIR AND + NOT CMAKE_CFG_INTDIR STREQUAL "." AND + NOT CMAKE_CFG_INTDIR MATCHES "\\$") + # CMake 3.4 and below used the CMAKE_CFG_INTDIR placeholder value + # provided by multi-configuration generators. Some projects were + # taking advantage of that undocumented implementation detail to + # specify a specific configuration here. They should use + # BUILD_COMMAND to change the default command instead, but for + # compatibility honor the value. + set(config ${CMAKE_CFG_INTDIR}) + message(AUTHOR_WARNING "CMAKE_CFG_INTDIR should not be set by project code.\n" + "To get a non-default build command, use the BUILD_COMMAND option.") + else() + set(config $<CONFIG>) + endif() + list(APPEND args --config ${config}) endif() if(step STREQUAL "INSTALL") list(APPEND args --target install) @@ -1241,7 +1256,7 @@ function(_ep_get_build_command name step cmd_var) string(REGEX REPLACE "^(.*/)cmake([^/]*)$" "\\1ctest\\2" cmd "${cmd}") set(args "") if(CMAKE_CONFIGURATION_TYPES) - list(APPEND args -C $<CONFIG>) + list(APPEND args -C ${config}) endif() endif() endif() |