summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-09-25 18:33:03 (GMT)
committerBrad King <brad.king@kitware.com>2015-09-25 18:36:30 (GMT)
commit993d064197b36de9e18131afc4ace753b8570d0b (patch)
tree4ea4afed58aa7a4dc97ddf2fb4b49720e525d875
parent02f95f9b7cc56aee8e4d73ea951bad34b622ec9b (diff)
downloadCMake-993d064197b36de9e18131afc4ace753b8570d0b.zip
CMake-993d064197b36de9e18131afc4ace753b8570d0b.tar.gz
CMake-993d064197b36de9e18131afc4ace753b8570d0b.tar.bz2
Ninja: Fix OBJECT_DIR placeholder substitution in link rules
Convert the OBJECT_DIR value to the shell output format so that it is properly quoted when the path contains spaces.
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 7e7e600..6e6c628 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -583,7 +583,9 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
}
const std::string objPath = GetTarget()->GetSupportDirectory();
- vars["OBJECT_DIR"] = ConvertToNinjaPath(objPath);
+ vars["OBJECT_DIR"] =
+ this->GetLocalGenerator()->ConvertToOutputFormat(
+ this->ConvertToNinjaPath(objPath), cmLocalGenerator::SHELL);
EnsureDirectoryExists(objPath);
if (this->GetGlobalGenerator()->IsGCCOnWindows())