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/cmGlobalUnixMakefileGenerator3.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/cmGlobalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmGlobalUnixMakefileGenerator3.cxx | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 9443b0a..caf71fd 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -319,18 +319,15 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile() std::string cache = this->GetCMakeInstance()->GetHomeOutputDirectory(); cache += "/CMakeCache.txt"; + std::string currentBinDir = lg->GetCurrentBinaryDirectory(); // Save the list to the cmake file. cmakefileStream << "# The top level Makefile was generated from the following files:\n" << "set(CMAKE_MAKEFILE_DEPENDS\n" - << " \"" - << lg->ConvertToRelativePath(lg->GetCurrentBinaryDirectory(), cache) - << "\"\n"; + << " \"" << lg->ConvertToRelativePath(currentBinDir, cache) << "\"\n"; for (std::vector<std::string>::const_iterator i = lfiles.begin(); i != lfiles.end(); ++i) { - cmakefileStream << " \"" - << lg->ConvertToRelativePath( - lg->GetCurrentBinaryDirectory(), *i) + cmakefileStream << " \"" << lg->ConvertToRelativePath(currentBinDir, *i) << "\"\n"; } cmakefileStream << " )\n\n"; @@ -344,12 +341,9 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile() cmakefileStream << "# The corresponding makefile is:\n" << "set(CMAKE_MAKEFILE_OUTPUTS\n" << " \"" - << lg->ConvertToRelativePath(lg->GetCurrentBinaryDirectory(), - makefileName) + << lg->ConvertToRelativePath(currentBinDir, makefileName) << "\"\n" - << " \"" - << lg->ConvertToRelativePath(lg->GetCurrentBinaryDirectory(), - check) + << " \"" << lg->ConvertToRelativePath(currentBinDir, check) << "\"\n"; cmakefileStream << " )\n\n"; |