summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-03-04 13:42:40 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-03-04 13:42:49 (GMT)
commit6873e984869d7f0f96cc8d93ebe76413d1b14b36 (patch)
tree1886594ee93f15913174a2f30088b201c2ec8a0e /Modules
parent80898a49d9c60f7f14c1135fe8eb3ba3b162f5fe (diff)
parente53a968ed582e28522b65c0f4ca00741294425b8 (diff)
downloadCMake-6873e984869d7f0f96cc8d93ebe76413d1b14b36.zip
CMake-6873e984869d7f0f96cc8d93ebe76413d1b14b36.tar.gz
CMake-6873e984869d7f0f96cc8d93ebe76413d1b14b36.tar.bz2
Merge topic 'llvm-rc'
e53a968ed5 MSVC: Use -D instead of /D in RC_FLAGS 1a281a1acd RC: Pass output file in a way that llvm-rc 7 and below understand fa339ced67 CMakeVersion.rc: Avoid preprocessor definitions to support llvm-rc Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3007
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeRCInformation.cmake2
-rw-r--r--Modules/Platform/Windows-MSVC.cmake6
2 files changed, 5 insertions, 3 deletions
diff --git a/Modules/CMakeRCInformation.cmake b/Modules/CMakeRCInformation.cmake
index 1227fdf..7bf6567 100644
--- a/Modules/CMakeRCInformation.cmake
+++ b/Modules/CMakeRCInformation.cmake
@@ -32,7 +32,7 @@ set(CMAKE_INCLUDE_FLAG_RC "-I")
# compile a Resource file into an object file
if(NOT CMAKE_RC_COMPILE_OBJECT)
set(CMAKE_RC_COMPILE_OBJECT
- "<CMAKE_RC_COMPILER> <DEFINES> <INCLUDES> <FLAGS> /fo<OBJECT> <SOURCE>")
+ "<CMAKE_RC_COMPILER> <DEFINES> <INCLUDES> <FLAGS> /fo <OBJECT> <SOURCE>")
endif()
# set this variable so we can avoid loading this more than once.
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)