diff options
Diffstat (limited to 'Source/cmLocalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmLocalNinjaGenerator.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 588f70b..a8570e2 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -39,7 +39,7 @@ cmLocalNinjaGenerator::cmLocalNinjaGenerator(cmGlobalGenerator* gg, cmMakefile* mf) - : cmLocalCommonGenerator(gg, mf, mf->GetState()->GetBinaryDirectory()) + : cmLocalCommonGenerator(gg, mf, WorkDir::TopBin) { } @@ -60,8 +60,8 @@ void cmLocalNinjaGenerator::Generate() { // Compute the path to use when referencing the current output // directory from the top output directory. - this->HomeRelativeOutputPath = this->MaybeConvertToRelativePath( - this->GetBinaryDirectory(), this->GetCurrentBinaryDirectory()); + this->HomeRelativeOutputPath = + this->MaybeRelativeToTopBinDir(this->GetCurrentBinaryDirectory()); if (this->HomeRelativeOutputPath == ".") { this->HomeRelativeOutputPath.clear(); } @@ -213,9 +213,8 @@ std::string cmLocalNinjaGenerator::ConvertToIncludeReference( cmSystemTools::CollapseFullPath(path, this->GetCurrentBinaryDirectory()), format); } - return this->ConvertToOutputFormat( - this->MaybeConvertToRelativePath(this->GetBinaryDirectory(), path), - format); + return this->ConvertToOutputFormat(this->MaybeRelativeToTopBinDir(path), + format); } // Private methods. @@ -881,8 +880,7 @@ std::string cmLocalNinjaGenerator::MakeCustomLauncher( if (!outputs.empty()) { output = outputs[0]; if (ccg.GetWorkingDirectory().empty()) { - output = this->MaybeConvertToRelativePath( - this->GetCurrentBinaryDirectory(), output); + output = this->MaybeRelativeToCurBinDir(output); } output = this->ConvertToOutputFormat(output, cmOutputConverter::SHELL); } |