diff options
author | Thomas Bernard <tbernard@go-engineering.de> | 2020-03-25 20:55:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-03-26 11:25:33 (GMT) |
commit | 4cc876540e8fa6c6344c0df64d669808c3727b86 (patch) | |
tree | 4b859fb1a4ecda3aa8aa50860a87cb3e4bf71926 /Modules/Platform | |
parent | e3185e3d1b92a95c18f22f70b3cef6944dd019eb (diff) | |
download | CMake-4cc876540e8fa6c6344c0df64d669808c3727b86.zip CMake-4cc876540e8fa6c6344c0df64d669808c3727b86.tar.gz CMake-4cc876540e8fa6c6344c0df64d669808c3727b86.tar.bz2 |
llvm-rc: Select preprocessor from active languages
The llvm-rc preprocessor is selected according to the
CMAKE_C_COMPILER_ID / CMAKE_CXX_COMPILER_ID which are only defined when
the C or CXX language is active.
Diffstat (limited to 'Modules/Platform')
-rw-r--r-- | Modules/Platform/Windows-Clang.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/Platform/Windows-Clang.cmake b/Modules/Platform/Windows-Clang.cmake index 87ddfcd..bd639b3 100644 --- a/Modules/Platform/Windows-Clang.cmake +++ b/Modules/Platform/Windows-Clang.cmake @@ -135,9 +135,9 @@ 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) |