From ca403b8c436e25e2fe5de5144fecf7aef8b5de78 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 20 Jun 2012 22:47:41 +0200 Subject: [PATCH] Construct the full path before escaping it. Should fix some dashboard errors. --- Source/cmNinjaTargetGenerator.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 106332892..e13006555 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -489,11 +489,10 @@ cmNinjaTargetGenerator cmLocalGenerator::RuleVariables compileObjectVars; std::string lang = language; compileObjectVars.Language = lang.c_str(); - std::string escapedSourceFileName = - this->LocalGenerator->ConvertToOutputFormat( - sourceFileName.c_str(), cmLocalGenerator::SHELL); - if (!cmSystemTools::FileIsFullPath(escapedSourceFileName.c_str())) + std::string escapedSourceFileName = sourceFileName; + + if (!cmSystemTools::FileIsFullPath(sourceFileName.c_str())) { escapedSourceFileName = cmSystemTools::CollapseFullPath( escapedSourceFileName.c_str(), @@ -501,6 +500,10 @@ cmNinjaTargetGenerator GetHomeOutputDirectory()); } + escapedSourceFileName = + this->LocalGenerator->ConvertToOutputFormat( + escapedSourceFileName.c_str(), cmLocalGenerator::SHELL); + compileObjectVars.Source = escapedSourceFileName.c_str(); compileObjectVars.Object = objectFileName.c_str(); compileObjectVars.Flags = vars["FLAGS"].c_str();