summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmAddCustomCommandCommand.cxx7
-rw-r--r--Source/cmCustomCommandGenerator.cxx1
2 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx
index d2330e1..d7afb57 100644
--- a/Source/cmAddCustomCommandCommand.cxx
+++ b/Source/cmAddCustomCommandCommand.cxx
@@ -4,7 +4,6 @@
#include <sstream>
#include <unordered_set>
-#include <utility>
#include "cmCustomCommand.h"
#include "cmCustomCommandLines.h"
@@ -248,6 +247,8 @@ bool cmAddCustomCommandCommand(std::vector<std::string> const& args,
// An implicit dependency starting point is also an
// explicit dependency.
std::string dep = copy;
+ // Upfront path conversion is correct because Genex
+ // are not supported.
cmSystemTools::ConvertToUnixSlashes(dep);
depends.push_back(dep);
@@ -264,9 +265,7 @@ bool cmAddCustomCommandCommand(std::vector<std::string> const& args,
target = copy;
break;
case doing_depends: {
- std::string dep = copy;
- cmSystemTools::ConvertToUnixSlashes(dep);
- depends.push_back(std::move(dep));
+ depends.push_back(copy);
} break;
case doing_outputs:
outputs.push_back(filename);
diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx
index 82cc037..6a4125b 100644
--- a/Source/cmCustomCommandGenerator.cxx
+++ b/Source/cmCustomCommandGenerator.cxx
@@ -58,6 +58,7 @@ cmCustomCommandGenerator::cmCustomCommandGenerator(cmCustomCommand const& cc,
std::vector<std::string> result =
cmExpandedList(cge->Evaluate(this->LG, this->Config));
for (std::string& it : result) {
+ cmSystemTools::ConvertToUnixSlashes(it);
if (cmSystemTools::FileIsFullPath(it)) {
it = cmSystemTools::CollapseFullPath(it);
}