diff options
author | Brad King <brad.king@kitware.com> | 2020-03-27 11:38:15 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-03-27 11:38:22 (GMT) |
commit | ab96bbff2cb81aa9d0c17da7e985455695f09224 (patch) | |
tree | 59db35af642eb054475e01caf3570686b5431227 /Modules/Platform/Windows-Clang.cmake | |
parent | a0b1463c26a7b287d42f57a646a874aef4a747af (diff) | |
parent | 2c724c3aea7ca028044cb845ff05cfeda1e50fc4 (diff) | |
download | CMake-ab96bbff2cb81aa9d0c17da7e985455695f09224.zip CMake-ab96bbff2cb81aa9d0c17da7e985455695f09224.tar.gz CMake-ab96bbff2cb81aa9d0c17da7e985455695f09224.tar.bz2 |
Merge topic 'llvm-rc-depfile'
2c724c3aea llvm-rc: Write depfile to location specified by the generator
4cc876540e llvm-rc: Select preprocessor from active languages
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4524
Diffstat (limited to 'Modules/Platform/Windows-Clang.cmake')
-rw-r--r-- | Modules/Platform/Windows-Clang.cmake | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/Platform/Windows-Clang.cmake b/Modules/Platform/Windows-Clang.cmake index 0c366b4..868c7d2 100644 --- a/Modules/Platform/Windows-Clang.cmake +++ b/Modules/Platform/Windows-Clang.cmake @@ -135,13 +135,14 @@ if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC" # Feed the preprocessed rc file to llvm-rc if(CMAKE_RC_COMPILER_INIT STREQUAL "llvm-rc") - if(DEFINED CMAKE_C_COMPILER) + if(DEFINED CMAKE_C_COMPILER_ID) set(CMAKE_RC_PREPROCESSOR CMAKE_C_COMPILER) - elseif(DEFINED CMAKE_CXX_COMPILER) + elseif(DEFINED CMAKE_CXX_COMPILER_ID) 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) |