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 2015-09-25 14:33:03 -04:00
parent 02f95f9b7c
commit 993d064197
1 changed files with 3 additions and 1 deletions

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())