summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-18 15:06:14 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-24 07:19:53 (GMT)
commit67b2f4312c431eb363dd94a2bb5d88cc6c8a7c95 (patch)
tree11419dddadbd492b9baef008e3e70eff5ae3e402 /Source/cmLocalGenerator.cxx
parentf528e6bcb9b2e181dcd7ee0c1cc327b6cad84ad5 (diff)
downloadCMake-67b2f4312c431eb363dd94a2bb5d88cc6c8a7c95.zip
CMake-67b2f4312c431eb363dd94a2bb5d88cc6c8a7c95.tar.gz
CMake-67b2f4312c431eb363dd94a2bb5d88cc6c8a7c95.tar.bz2
Port to GetGeneratorTargets.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx27
1 files changed, 14 insertions, 13 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 3658473..2166c09 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2510,28 +2510,29 @@ cmLocalGenerator
{
// Convert the old-style install specification from each target to
// an install generator and run it.
- cmTargets& tgts = this->Makefile->GetTargets();
- for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l)
+ std::vector<cmGeneratorTarget*> tgts = this->GetGeneratorTargets();
+ for(std::vector<cmGeneratorTarget*>::iterator l = tgts.begin();
+ l != tgts.end(); ++l)
{
- if (l->second.GetType() == cmState::INTERFACE_LIBRARY)
+ if ((*l)->GetType() == cmState::INTERFACE_LIBRARY)
{
continue;
}
// Include the user-specified pre-install script for this target.
- if(const char* preinstall = l->second.GetProperty("PRE_INSTALL_SCRIPT"))
+ if(const char* preinstall = (*l)->GetProperty("PRE_INSTALL_SCRIPT"))
{
cmInstallScriptGenerator g(preinstall, false, 0);
g.Generate(os, config, configurationTypes);
}
// Install this target if a destination is given.
- if(l->second.GetInstallPath() != "")
+ if((*l)->Target->GetInstallPath() != "")
{
// Compute the full install destination. Note that converting
// to unix slashes also removes any trailing slash.
// We also skip over the leading slash given by the user.
- std::string destination = l->second.GetInstallPath().substr(1);
+ std::string destination = (*l)->Target->GetInstallPath().substr(1);
cmSystemTools::ConvertToUnixSlashes(destination);
if(destination.empty())
{
@@ -2539,7 +2540,7 @@ cmLocalGenerator
}
// Generate the proper install generator for this target type.
- switch(l->second.GetType())
+ switch((*l)->GetType())
{
case cmState::EXECUTABLE:
case cmState::STATIC_LIBRARY:
@@ -2547,7 +2548,7 @@ cmLocalGenerator
{
// Use a target install generator.
cmInstallTargetGeneratorLocal
- g(this, l->first, destination.c_str(), false);
+ g(this, (*l)->GetName(), destination.c_str(), false);
g.Generate(os, config, configurationTypes);
}
break;
@@ -2558,18 +2559,18 @@ cmLocalGenerator
// to the normal destination and the DLL to the runtime
// destination.
cmInstallTargetGeneratorLocal
- g1(this, l->first, destination.c_str(), true);
+ g1(this, (*l)->GetName(), destination.c_str(), true);
g1.Generate(os, config, configurationTypes);
// We also skip over the leading slash given by the user.
- destination = l->second.GetRuntimeInstallPath().substr(1);
+ destination = (*l)->Target->GetRuntimeInstallPath().substr(1);
cmSystemTools::ConvertToUnixSlashes(destination);
cmInstallTargetGeneratorLocal
- g2(this, l->first, destination.c_str(), false);
+ g2(this, (*l)->GetName(), destination.c_str(), false);
g2.Generate(os, config, configurationTypes);
#else
// Use a target install generator.
cmInstallTargetGeneratorLocal
- g(this, l->first, destination.c_str(), false);
+ g(this, (*l)->GetName(), destination.c_str(), false);
g.Generate(os, config, configurationTypes);
#endif
}
@@ -2580,7 +2581,7 @@ cmLocalGenerator
}
// Include the user-specified post-install script for this target.
- if(const char* postinstall = l->second.GetProperty("POST_INSTALL_SCRIPT"))
+ if(const char* postinstall = (*l)->GetProperty("POST_INSTALL_SCRIPT"))
{
cmInstallScriptGenerator g(postinstall, false, 0);
g.Generate(os, config, configurationTypes);