diff options
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index a362d13..0c8ae8d 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -492,6 +492,15 @@ cmNinjaTargetGenerator std::string escapedSourceFileName = this->LocalGenerator->ConvertToOutputFormat( sourceFileName.c_str(), cmLocalGenerator::SHELL); + + if (!cmSystemTools::FileIsFullPath(escapedSourceFileName.c_str())) + { + escapedSourceFileName = cmSystemTools::CollapseFullPath( + escapedSourceFileName.c_str(), + this->GetGlobalGenerator()->GetCMakeInstance()->GetHomeOutputDirectory()); + } + + compileObjectVars.Source = escapedSourceFileName.c_str(); compileObjectVars.Object = objectFileName.c_str(); compileObjectVars.Flags = vars["FLAGS"].c_str(); |