From bba37dd51753165ce3ade61badb61c07e1058e90 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Tue, 13 Mar 2012 17:01:25 -0400 Subject: [PATCH] Ninja: Fix for PDB files with spaces in the path. This calls ConvertToOutputFormat on the PDB paths for pdb file paths used in both library creation and the building of object files. --- Source/cmNinjaNormalTargetGenerator.cxx | 3 ++- Source/cmNinjaTargetGenerator.cxx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index af7bcd621..439f73413 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -372,7 +372,8 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() targetOutputImplib.c_str(), cmLocalGenerator::SHELL); } - vars["TARGET_PDB"] = this->GetTargetPDB(); + vars["TARGET_PDB"] = this->GetLocalGenerator()->ConvertToOutputFormat( + this->GetTargetPDB().c_str(), cmLocalGenerator::SHELL); std::vector *cmdLists[3] = { &this->GetTarget()->GetPreBuildCommands(), diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 8fa367f03..b9f997dc4 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -464,7 +464,8 @@ cmNinjaTargetGenerator cmNinjaVars vars; vars["FLAGS"] = this->ComputeFlagsForObject(source, language); vars["DEFINES"] = this->ComputeDefines(source, language); - vars["TARGET_PDB"] = this->GetTargetPDB(); + vars["TARGET_PDB"] = this->GetLocalGenerator()->ConvertToOutputFormat( + this->GetTargetPDB().c_str(), cmLocalGenerator::SHELL); cmGlobalNinjaGenerator::WriteBuild(this->GetBuildFileStream(), comment,