summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2012-02-19 02:46:37 (GMT)
committerPeter Collingbourne <peter@pcc.me.uk>2012-02-19 05:43:47 (GMT)
commit43b1d8bad0cf78148e4d6e7b4013850731d5a824 (patch)
treeae8d8dc886b71df197dee31ac00dca7215b6e367 /Source/cmNinjaNormalTargetGenerator.cxx
parentcea03e632b71589592660614a63ff102ba923de8 (diff)
downloadCMake-43b1d8bad0cf78148e4d6e7b4013850731d5a824.zip
CMake-43b1d8bad0cf78148e4d6e7b4013850731d5a824.tar.gz
CMake-43b1d8bad0cf78148e4d6e7b4013850731d5a824.tar.bz2
Ninja: Shell encode paths used in "cd" commands
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 7cce45b..4434aef 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -377,9 +377,12 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
// If we have any PRE_LINK commands, we need to go back to HOME_OUTPUT for
// the link commands.
- if (!preLinkCmdLines.empty())
- preLinkCmdLines.push_back(std::string("cd ") +
- this->GetMakefile()->GetHomeOutputDirectory());
+ if (!preLinkCmdLines.empty()) {
+ std::string path = this->GetLocalGenerator()->ConvertToOutputFormat(
+ this->GetMakefile()->GetHomeOutputDirectory(),
+ cmLocalGenerator::SHELL);
+ preLinkCmdLines.push_back("cd " + path);
+ }
vars["PRE_LINK"] =
this->GetLocalGenerator()->BuildCommandLine(preLinkCmdLines);