diff options
author | Sebastian Lipponer <mail@sebastianlipponer.de> | 2019-09-06 20:33:47 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-09-13 14:56:26 (GMT) |
commit | c16641607fcf85206b3faf67ae1e1bab173bf44d (patch) | |
tree | 4cfb9e7d393b393498a00d5a5f1d25aa2b27d789 /Source/cmAddCustomCommandCommand.cxx | |
parent | 922482dd3acd2af9d26476134b3386c5a7695a03 (diff) | |
download | CMake-c16641607fcf85206b3faf67ae1e1bab173bf44d.zip CMake-c16641607fcf85206b3faf67ae1e1bab173bf44d.tar.gz CMake-c16641607fcf85206b3faf67ae1e1bab173bf44d.tar.bz2 |
add_custom_command: Delay slash conversion until after genex evaluation
Generator expressions may contain or produce backslashes.
Fixes: #19553
Diffstat (limited to 'Source/cmAddCustomCommandCommand.cxx')
-rw-r--r-- | Source/cmAddCustomCommandCommand.cxx | 7 |
1 files changed, 3 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); |