diff options
author | Brad King <brad.king@kitware.com> | 2019-09-16 14:16:40 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-09-16 14:17:22 (GMT) |
commit | 1df2f8803b79c2e27d123de4f3f351bae824feef (patch) | |
tree | dcc2ae954d2b87b96c702ac2e45d13dae0de615a /Source | |
parent | 33588714832de46915542094c93a96096755fb55 (diff) | |
parent | c16641607fcf85206b3faf67ae1e1bab173bf44d (diff) | |
download | CMake-1df2f8803b79c2e27d123de4f3f351bae824feef.zip CMake-1df2f8803b79c2e27d123de4f3f351bae824feef.tar.gz CMake-1df2f8803b79c2e27d123de4f3f351bae824feef.tar.bz2 |
Merge topic 'add_custom_command-genex-slash'
c16641607f add_custom_command: Delay slash conversion until after genex evaluation
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3791
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmAddCustomCommandCommand.cxx | 7 | ||||
-rw-r--r-- | Source/cmCustomCommandGenerator.cxx | 1 |
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); } |