summaryrefslogtreecommitdiffstats
path: root/Source/cmCustomCommandGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmCustomCommandGenerator.cxx')
-rw-r--r--Source/cmCustomCommandGenerator.cxx20
1 files changed, 13 insertions, 7 deletions
diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx
index c1f412d..2432d2b 100644
--- a/Source/cmCustomCommandGenerator.cxx
+++ b/Source/cmCustomCommandGenerator.cxx
@@ -6,7 +6,8 @@
#include <memory>
#include <utility>
-#include "cmAlgorithms.h"
+#include <cmext/algorithm>
+
#include "cmCustomCommand.h"
#include "cmCustomCommandLines.h"
#include "cmGeneratorExpression.h"
@@ -29,10 +30,11 @@ void AppendPaths(const std::vector<std::string>& inputs,
for (std::string& it : result) {
cmSystemTools::ConvertToUnixSlashes(it);
if (cmSystemTools::FileIsFullPath(it)) {
- it = cmSystemTools::CollapseFullPath(it);
+ it = cmSystemTools::CollapseFullPath(
+ it, lg->GetMakefile()->GetHomeOutputDirectory());
}
}
- cmAppend(output, result);
+ cm::append(output, result);
}
}
}
@@ -56,7 +58,7 @@ cmCustomCommandGenerator::cmCustomCommandGenerator(cmCustomCommand const& cc,
std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(clarg);
std::string parsed_arg = cge->Evaluate(this->LG, this->Config);
if (this->CC.GetCommandExpandLists()) {
- cmAppend(argv, cmExpandedList(parsed_arg));
+ cm::append(argv, cmExpandedList(parsed_arg));
} else {
argv.push_back(std::move(parsed_arg));
}
@@ -137,7 +139,7 @@ const char* cmCustomCommandGenerator::GetArgv0Location(unsigned int c) const
(target->IsImported() ||
target->GetProperty("CROSSCOMPILING_EMULATOR") ||
!this->LG->GetMakefile()->IsOn("CMAKE_CROSSCOMPILING"))) {
- return target->GetLocation(this->Config);
+ return target->GetLocation(this->Config).c_str();
}
return nullptr;
}
@@ -201,7 +203,9 @@ void cmCustomCommandGenerator::AppendArguments(unsigned int c,
if (this->OldStyle) {
cmd += escapeForShellOldStyle(emulator[j]);
} else {
- cmd += this->LG->EscapeForShell(emulator[j], this->MakeVars);
+ cmd +=
+ this->LG->EscapeForShell(emulator[j], this->MakeVars, false, false,
+ this->MakeVars && this->LG->IsNinjaMulti());
}
}
@@ -222,7 +226,9 @@ void cmCustomCommandGenerator::AppendArguments(unsigned int c,
if (this->OldStyle) {
cmd += escapeForShellOldStyle(arg);
} else {
- cmd += this->LG->EscapeForShell(arg, this->MakeVars);
+ cmd +=
+ this->LG->EscapeForShell(arg, this->MakeVars, false, false,
+ this->MakeVars && this->LG->IsNinjaMulti());
}
}
}