mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 10:50:16 -06:00
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.
This commit is contained in:
committed by
Brad King
parent
e3185e3d1b
commit
4cc876540e
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user