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/cmLocalGenerator.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/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index d909011..6d3ce1c 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -177,11 +177,11 @@ void cmLocalGenerator::GenerateTestFiles() } typedef std::vector<cmState::Snapshot> vec_t; vec_t const& children = this->Makefile->GetStateSnapshot().GetChildren(); + std::string parentBinDir = this->GetCurrentBinaryDirectory(); for (vec_t::const_iterator i = children.begin(); i != children.end(); ++i) { // TODO: Use add_subdirectory instead? std::string outP = i->GetDirectory().GetCurrentBinary(); - outP = - this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), outP); + outP = this->ConvertToRelativePath(parentBinDir, outP); outP = cmOutputConverter::EscapeForCMake(outP); fout << "subdirs(" << outP << ")" << std::endl; } @@ -2243,11 +2243,11 @@ std::string cmLocalGenerator::ConstructComment( std::string comment; comment = "Generating "; const char* sep = ""; + std::string currentBinaryDir = this->GetCurrentBinaryDirectory(); for (std::vector<std::string>::const_iterator o = ccg.GetOutputs().begin(); o != ccg.GetOutputs().end(); ++o) { comment += sep; - comment += - this->ConvertToRelativePath(this->GetCurrentBinaryDirectory(), *o); + comment += this->ConvertToRelativePath(currentBinaryDir, *o); sep = ", "; } return comment; |