summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio7Generator.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/cmGlobalVisualStudio7Generator.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/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index ed41e60..7664b02 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -382,6 +382,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
{
VisualStudioFolders.clear();
+ std::string rootBinaryDir = root->GetCurrentBinaryDirectory();
for (OrderedTargetDependSet::const_iterator tt = projectTargets.begin();
tt != projectTargets.end(); ++tt) {
cmGeneratorTarget const* target = *tt;
@@ -405,8 +406,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
if (vcprojName) {
cmLocalGenerator* lg = target->GetLocalGenerator();
std::string dir = lg->GetCurrentBinaryDirectory();
- dir = root->ConvertToRelativePath(root->GetCurrentBinaryDirectory(),
- dir.c_str());
+ dir = root->ConvertToRelativePath(rootBinaryDir, dir.c_str());
if (dir == ".") {
dir = ""; // msbuild cannot handle ".\" prefix
}