diff options
author | Stephen Kelly <steveire@gmail.com> | 2016-09-06 21:52:42 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2016-09-19 19:36:12 (GMT) |
commit | 839c65bca032b80cfa7fe0de2ad35c2448421092 (patch) | |
tree | 89128503dafc452ce33455f6dbce08927b48be3d /Source/cmDependsFortran.cxx | |
parent | 21b5fdf9a39f739c3566f3e77a4c5244da1b7e3a (diff) | |
download | CMake-839c65bca032b80cfa7fe0de2ad35c2448421092.zip CMake-839c65bca032b80cfa7fe0de2ad35c2448421092.tar.gz CMake-839c65bca032b80cfa7fe0de2ad35c2448421092.tar.bz2 |
Convert: Move access to CurrentBinaryDirectory out of loops
Diffstat (limited to 'Source/cmDependsFortran.cxx')
-rw-r--r-- | Source/cmDependsFortran.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index eed31fa..44592bb 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -189,6 +189,8 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends, cmGeneratedFileStream fcStream(fcName.c_str()); fcStream << "# Remove fortran modules provided by this target.\n"; fcStream << "FILE(REMOVE"; + std::string currentBinDir = + this->LocalGenerator->GetCurrentBinaryDirectory(); for (std::set<std::string>::const_iterator i = provides.begin(); i != provides.end(); ++i) { std::string mod_upper = mod_dir; @@ -205,18 +207,16 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends, stamp += ".mod.stamp"; fcStream << "\n"; fcStream << " \"" - << this->LocalGenerator->ConvertToRelativePath( - this->LocalGenerator->GetCurrentBinaryDirectory(), - mod_lower) + << this->LocalGenerator->ConvertToRelativePath(currentBinDir, + mod_lower) << "\"\n"; fcStream << " \"" - << this->LocalGenerator->ConvertToRelativePath( - this->LocalGenerator->GetCurrentBinaryDirectory(), - mod_upper) + << this->LocalGenerator->ConvertToRelativePath(currentBinDir, + mod_upper) << "\"\n"; fcStream << " \"" - << this->LocalGenerator->ConvertToRelativePath( - this->LocalGenerator->GetCurrentBinaryDirectory(), stamp) + << this->LocalGenerator->ConvertToRelativePath(currentBinDir, + stamp) << "\"\n"; } fcStream << " )\n"; |