summaryrefslogtreecommitdiffstats
path: root/Source/cmcmd.cxx
diff options
context:
space:
mode:
authorThomas Bernard <tbernard@go-engineering.de>2020-07-28 20:12:13 (GMT)
committerBrad King <brad.king@kitware.com>2020-08-07 15:47:15 (GMT)
commita94672b919db3ec961e5b4405352fec9ba95ddeb (patch)
tree4e5bcc80050605667fea1129d2a0372bd2e9db3e /Source/cmcmd.cxx
parent383090bf591e82d5488bd3454ca4c40ceaf575df (diff)
downloadCMake-a94672b919db3ec961e5b4405352fec9ba95ddeb.zip
CMake-a94672b919db3ec961e5b4405352fec9ba95ddeb.tar.gz
CMake-a94672b919db3ec961e5b4405352fec9ba95ddeb.tar.bz2
cmake: Change cmake_llvm_rc separator from -- to ++ to avoid conflict
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r--Source/cmcmd.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 1a5fea1..a1c6771 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -1772,7 +1772,7 @@ int cmcmd::RunLLVMRC(std::vector<std::string> const& args)
// args[2] == source_file_path
// args[3] == intermediate_file
// args[4..n] == preprocess+args
- // args[n+1] == --
+ // args[n+1] == ++
// args[n+2...] == llvm-rc+args
if (args.size() < 3) {
std::cerr << "Invalid cmake_llvm_rc arguments";
@@ -1784,7 +1784,11 @@ int cmcmd::RunLLVMRC(std::vector<std::string> const& args)
std::vector<std::string> resource_compile;
std::vector<std::string>* pArgTgt = &preprocess;
for (std::string const& arg : cmMakeRange(args).advance(4)) {
- if (arg == "--") {
+ // We use ++ as seperator between the preprocessing step definition and the
+ // rc compilation step becase we need to prepend a -- to seperate the
+ // source file properly from other options when using clang-cl for
+ // preprocessing.
+ if (arg == "++") {
pArgTgt = &resource_compile;
} else {
if (arg.find("SOURCE_DIR") != std::string::npos) {