diff options
author | Zsolt Parragi <zsolt.parragi@cancellar.hu> | 2019-03-01 13:11:01 (GMT) |
---|---|---|
committer | Zsolt Parragi <zsolt.parragi@cancellar.hu> | 2019-03-01 13:11:01 (GMT) |
commit | e53a968ed582e28522b65c0f4ca00741294425b8 (patch) | |
tree | 2c4948c3534f205dd4d840d44846e3d61df02b2b /Modules/Platform | |
parent | 1a281a1acdcce3d6ce5a2a37fc4e0f6ab77ff0c3 (diff) | |
download | CMake-e53a968ed582e28522b65c0f4ca00741294425b8.zip CMake-e53a968ed582e28522b65c0f4ca00741294425b8.tar.gz CMake-e53a968ed582e28522b65c0f4ca00741294425b8.tar.bz2 |
MSVC: Use -D instead of /D in RC_FLAGS
llvm-rc can't handle definitions given with /D and without a space.
Diffstat (limited to 'Modules/Platform')
-rw-r--r-- | Modules/Platform/Windows-MSVC.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index 2daf313..0e11790 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -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) |