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.
This commit is contained in:
Brad King committed 2015-09-25 14:36:30 -04:00
1 parent 02f95f9b7c
commit 993d064197
1 file changed
+3 -1
+3 -1
View File
@@ -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())