From 7b127c62d4d4c94cf96e9d406859dbd24eed7dc9 Mon Sep 17 00:00:00 2001
From: Stephen Kelly <steveire@gmail.com>
Date: Sat, 24 Oct 2015 15:42:04 +0200
Subject: VS7: Port remaining interface to cmGeneratorTarget

---
 Source/cmGlobalVisualStudio7Generator.cxx | 17 ++++++++---------
 Source/cmGlobalVisualStudio7Generator.h   |  4 ++--
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 340a0f7..f5848ab 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -401,7 +401,7 @@ void cmGlobalVisualStudio7Generator::WriteTargetConfigurations(
   for(OrderedTargetDependSet::const_iterator tt =
         projectTargets.begin(); tt != projectTargets.end(); ++tt)
     {
-    cmTarget const* target = (*tt)->Target;
+    cmGeneratorTarget const* target = *tt;
     if(target->GetType() == cmState::INTERFACE_LIBRARY)
       {
       continue;
@@ -996,7 +996,8 @@ cmGlobalVisualStudio7Generator
 std::set<std::string>
 cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(
   std::vector<std::string> const& configs,
-  OrderedTargetDependSet const& projectTargets, cmTarget const* target)
+  OrderedTargetDependSet const& projectTargets,
+  cmGeneratorTarget const* target)
 {
   std::set<std::string> activeConfigs;
   // if it is a utilitiy target then only make it part of the
@@ -1011,13 +1012,13 @@ cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(
       for(std::vector<std::string>::const_iterator i = configs.begin();
           i != configs.end(); ++i)
         {
-        const char* propertyValue = target->GetMakefile()
+        const char* propertyValue = target->Target->GetMakefile()
           ->GetDefinition("CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD");
         cmGeneratorExpression ge;
         cmsys::auto_ptr<cmCompiledGeneratorExpression>
           cge = ge.Parse(propertyValue);
-        cmGeneratorTarget* gt = this->GetGeneratorTarget(target);
-        if(cmSystemTools::IsOn(cge->Evaluate(gt->GetLocalGenerator(), *i)))
+        if(cmSystemTools::IsOn(cge->Evaluate(target->GetLocalGenerator(),
+                                             *i)))
           {
           activeConfigs.insert(*i);
           }
@@ -1029,13 +1030,12 @@ cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(
     {
     return activeConfigs;
     }
-  cmGeneratorTarget* gt = this->GetGeneratorTarget(target);
   // inspect EXCLUDE_FROM_DEFAULT_BUILD[_<CONFIG>] properties
   for(std::vector<std::string>::const_iterator i = configs.begin();
       i != configs.end(); ++i)
     {
     const char* propertyValue =
-      gt->GetFeature("EXCLUDE_FROM_DEFAULT_BUILD", i->c_str());
+      target->GetFeature("EXCLUDE_FROM_DEFAULT_BUILD", i->c_str());
     if(cmSystemTools::IsOff(propertyValue))
       {
       activeConfigs.insert(*i);
@@ -1047,9 +1047,8 @@ cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(
 bool
 cmGlobalVisualStudio7Generator
 ::IsDependedOn(OrderedTargetDependSet const& projectTargets,
-               cmTarget const* targetIn)
+               cmGeneratorTarget const* gtIn)
 {
-  cmGeneratorTarget* gtIn = this->GetGeneratorTarget(targetIn);
   for (OrderedTargetDependSet::const_iterator l = projectTargets.begin();
        l != projectTargets.end(); ++l)
     {
diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h
index 6a0e5e9..fe6db2e 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -163,9 +163,9 @@ protected:
   std::set<std::string>
     IsPartOfDefaultBuild(std::vector<std::string> const& configs,
                          OrderedTargetDependSet const& projectTargets,
-                         cmTarget const* target);
+                         cmGeneratorTarget const* target);
   bool IsDependedOn(OrderedTargetDependSet const& projectTargets,
-                    cmTarget const* target);
+                    cmGeneratorTarget const* target);
   std::map<std::string, std::string> GUIDMap;
 
   virtual void WriteFolders(std::ostream& fout);
-- 
cgit v0.12