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/cmLocalUnixMakefileGenerator3.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/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 6d2dac2..697d856 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1853,9 +1853,9 @@ void cmLocalUnixMakefileGenerator3::WriteDependLanguageInfo( const std::string& config = this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"); this->GetIncludeDirectories(includes, target, l->first, config); + std::string binaryDir = this->GetState()->GetBinaryDirectory(); if (this->Makefile->IsOn("CMAKE_DEPENDS_IN_PROJECT_ONLY")) { const char* sourceDir = this->GetState()->GetSourceDirectory(); - const char* binaryDir = this->GetState()->GetBinaryDirectory(); std::vector<std::string>::iterator itr = std::remove_if(includes.begin(), includes.end(), ::NotInProjectDir(sourceDir, binaryDir)); @@ -1863,9 +1863,7 @@ void cmLocalUnixMakefileGenerator3::WriteDependLanguageInfo( } for (std::vector<std::string>::iterator i = includes.begin(); i != includes.end(); ++i) { - cmakefileStream << " \"" - << this->ConvertToRelativePath( - this->GetBinaryDirectory(), *i) + cmakefileStream << " \"" << this->ConvertToRelativePath(binaryDir, *i) << "\"\n"; } cmakefileStream << " )\n"; |