diff options
author | Stephen Kelly <steveire@gmail.com> | 2016-09-06 21:29:01 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2016-09-19 19:36:13 (GMT) |
commit | e13e519e1c3f76b826365b5fa72a50dba180c191 (patch) | |
tree | 85e9c3d6c9fb959d1dfe5093aba5c0fdf09ccfc9 /Source/cmGlobalUnixMakefileGenerator3.cxx | |
parent | 34c6e995f9ac1c62540b68dd50934c8c0be98b7f (diff) | |
download | CMake-e13e519e1c3f76b826365b5fa72a50dba180c191.zip CMake-e13e519e1c3f76b826365b5fa72a50dba180c191.tar.gz CMake-e13e519e1c3f76b826365b5fa72a50dba180c191.tar.bz2 |
Convert: Move access to BinaryDirectory out of loops
Diffstat (limited to 'Source/cmGlobalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmGlobalUnixMakefileGenerator3.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 5438375..c17eb23 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -347,6 +347,8 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile() << "\"\n"; cmakefileStream << " )\n\n"; + const std::string binDir = lg->GetBinaryDirectory(); + // CMake must rerun if a byproduct is missing. { cmakefileStream << "# Byproducts of CMake generate step:\n" @@ -355,9 +357,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile() lg->GetMakefile()->GetOutputFiles(); for (std::vector<std::string>::const_iterator k = outfiles.begin(); k != outfiles.end(); ++k) { - cmakefileStream << " \"" - << lg->ConvertToRelativePath(lg->GetBinaryDirectory(), - *k) + cmakefileStream << " \"" << lg->ConvertToRelativePath(binDir, *k) << "\"\n"; } @@ -369,9 +369,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile() tmpStr = lg->GetCurrentBinaryDirectory(); tmpStr += cmake::GetCMakeFilesDirectory(); tmpStr += "/CMakeDirectoryInformation.cmake"; - cmakefileStream << " \"" - << lg->ConvertToRelativePath(lg->GetBinaryDirectory(), - tmpStr) + cmakefileStream << " \"" << lg->ConvertToRelativePath(binDir, tmpStr) << "\"\n"; } cmakefileStream << " )\n\n"; |