From 993d064197b36de9e18131afc4ace753b8570d0b Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 25 Sep 2015 14:33:03 -0400 Subject: [PATCH] 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. --- Source/cmNinjaNormalTargetGenerator.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 7e7e60022..6e6c62897 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())