From e7c895674620afc51cf525e85b71601165eb4c05 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 27 Aug 2016 18:20:37 +0200 Subject: [PATCH] Convert: Inline uses of HOME_OUTPUT --- Source/cmDependsFortran.cxx | 12 ++++++++---- Source/cmLocalNinjaGenerator.cxx | 3 ++- Source/cmMakefileTargetGenerator.cxx | 6 ++++-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index d7e2c332c..9fb4221fe 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -428,14 +428,18 @@ bool cmDependsFortran::WriteDependenciesReal(const char* obj, std::string modFile = mod_dir; modFile += "/"; modFile += *i; - modFile = this->LocalGenerator->Convert( - modFile, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::SHELL); + modFile = this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetBinaryDirectory(), modFile), + cmOutputConverter::SHELL); std::string stampFile = stamp_dir; stampFile += "/"; stampFile += m; stampFile += ".mod.stamp"; - stampFile = this->LocalGenerator->Convert( - stampFile, cmOutputConverter::HOME_OUTPUT, cmOutputConverter::SHELL); + stampFile = this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetBinaryDirectory(), stampFile), + cmOutputConverter::SHELL); makeDepends << "\t$(CMAKE_COMMAND) -E cmake_copy_f90_mod " << modFile << " " << stampFile; cmMakefile* mf = this->LocalGenerator->GetMakefile(); diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 94f4929f1..f2a13bc4b 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -145,7 +145,8 @@ std::string cmLocalNinjaGenerator::ConvertToIncludeReference( return this->ConvertToOutputFormat(cmSystemTools::CollapseFullPath(path), format); } - return this->Convert(path, cmOutputConverter::HOME_OUTPUT, format); + return this->ConvertToOutputFormat( + this->ConvertToRelativePath(this->GetBinaryDirectory(), path), format); } // Private methods. diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 9809be6b7..cdf4330e4 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -904,8 +904,10 @@ bool cmMakefileTargetGenerator::WriteMakeRule( o != outputs.end(); ++o) { // Touch the extra output so "make" knows that it was updated, // but only if the output was acually created. - std::string const out = this->Convert(*o, cmOutputConverter::HOME_OUTPUT, - cmOutputConverter::SHELL); + std::string const out = this->LocalGenerator->ConvertToOutputFormat( + this->LocalGenerator->ConvertToRelativePath( + this->LocalGenerator->GetBinaryDirectory(), *o), + cmOutputConverter::SHELL); std::vector output_commands; bool o_symbolic = false;