mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-01 19:30:13 -06:00
MSVC: Use -D instead of /D in RC_FLAGS
llvm-rc can't handle definitions given with /D and without a space.
This commit is contained in:
@@ -374,10 +374,12 @@ macro(__windows_compiler_msvc_enable_rc flags)
|
||||
set(CMAKE_RC_COMPILER_INIT rc)
|
||||
endif()
|
||||
if(NOT CMAKE_RC_FLAGS_INIT)
|
||||
string(APPEND CMAKE_RC_FLAGS_INIT " ${flags}")
|
||||
# llvm-rc fails when flags are specified with /D and no space after
|
||||
string(REPLACE " /D" " -D" fixed_flags " ${flags}")
|
||||
string(APPEND CMAKE_RC_FLAGS_INIT " ${fixed_flags}")
|
||||
endif()
|
||||
if(NOT CMAKE_RC_FLAGS_DEBUG_INIT)
|
||||
string(APPEND CMAKE_RC_FLAGS_DEBUG_INIT " /D_DEBUG")
|
||||
string(APPEND CMAKE_RC_FLAGS_DEBUG_INIT " -D_DEBUG")
|
||||
endif()
|
||||
|
||||
enable_language(RC)
|
||||
|
||||
Reference in New Issue
Block a user