diff options
author | Thomas Bernard <tbernard@go-engineering.de> | 2020-03-25 20:49:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-03-26 11:26:21 (GMT) |
commit | 2c724c3aea7ca028044cb845ff05cfeda1e50fc4 (patch) | |
tree | 124325314bb31337d931f3810ea6b5d27c22769d /Modules/Platform | |
parent | 4cc876540e8fa6c6344c0df64d669808c3727b86 (diff) | |
download | CMake-2c724c3aea7ca028044cb845ff05cfeda1e50fc4.zip CMake-2c724c3aea7ca028044cb845ff05cfeda1e50fc4.tar.gz CMake-2c724c3aea7ca028044cb845ff05cfeda1e50fc4.tar.bz2 |
llvm-rc: Write depfile to location specified by the generator
Move the depfile flags to `CMAKE_DEPFILE_FLAGS_RC` so that they
are only usedwith generators that use depfiles. Also switch to
using the `<DEPFILE>` placeholder for the location of the depfile
so that it goes where the generator expects.
Fixes: #20493
Diffstat (limited to 'Modules/Platform')
-rw-r--r-- | Modules/Platform/Windows-Clang.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/Platform/Windows-Clang.cmake b/Modules/Platform/Windows-Clang.cmake index bd639b3..c08bb41 100644 --- a/Modules/Platform/Windows-Clang.cmake +++ b/Modules/Platform/Windows-Clang.cmake @@ -141,7 +141,8 @@ if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC" set(CMAKE_RC_PREPROCESSOR CMAKE_CXX_COMPILER) endif() if(DEFINED CMAKE_RC_PREPROCESSOR) - set(CMAKE_RC_COMPILE_OBJECT "${CMAKE_COMMAND} -E cmake_llvm_rc <OBJECT>.pp <${CMAKE_RC_PREPROCESSOR}> <DEFINES> -DRC_INVOKED <INCLUDES> <FLAGS> -clang:-MD -clang:-MF -clang:<SOURCE>.d -E <SOURCE> -- <CMAKE_RC_COMPILER> <DEFINES> /fo <OBJECT> <OBJECT>.pp") + set(CMAKE_DEPFILE_FLAGS_RC "-clang:-MD -clang:-MF -clang:<DEPFILE>") + set(CMAKE_RC_COMPILE_OBJECT "${CMAKE_COMMAND} -E cmake_llvm_rc <OBJECT>.pp <${CMAKE_RC_PREPROCESSOR}> <DEFINES> -DRC_INVOKED <INCLUDES> <FLAGS> -E <SOURCE> -- <CMAKE_RC_COMPILER> <DEFINES> /fo <OBJECT> <OBJECT>.pp") if(CMAKE_GENERATOR STREQUAL "Ninja") set(CMAKE_NINJA_CMCLDEPS_RC 0) set(CMAKE_NINJA_DEP_TYPE_RC gcc) |