summaryrefslogtreecommitdiffstats
path: root/Source/cmDependsFortran.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2016-09-06 21:52:42 (GMT)
committerStephen Kelly <steveire@gmail.com>2016-09-19 19:36:12 (GMT)
commit839c65bca032b80cfa7fe0de2ad35c2448421092 (patch)
tree89128503dafc452ce33455f6dbce08927b48be3d /Source/cmDependsFortran.cxx
parent21b5fdf9a39f739c3566f3e77a4c5244da1b7e3a (diff)
downloadCMake-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.cxx16
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";