summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-23 16:26:45 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-24 07:24:43 (GMT)
commit330bfa83368989f6fd67072ef9f5c9e457230f17 (patch)
tree78f8ff78b76ed6c10897eb9622d58f624379ec07
parentb13e26e278dcc34243a2b31dfca8e23b01e15b76 (diff)
downloadCMake-330bfa83368989f6fd67072ef9f5c9e457230f17.zip
CMake-330bfa83368989f6fd67072ef9f5c9e457230f17.tar.gz
CMake-330bfa83368989f6fd67072ef9f5c9e457230f17.tar.bz2
VS: Port target depends to cmGeneratorTarget
-rw-r--r--Source/cmGlobalVisualStudio6Generator.cxx2
-rw-r--r--Source/cmGlobalVisualStudio71Generator.cxx2
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx2
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx26
-rw-r--r--Source/cmGlobalVisualStudioGenerator.h4
5 files changed, 18 insertions, 18 deletions
diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx
index 9e411c9..7d0c558 100644
--- a/Source/cmGlobalVisualStudio6Generator.cxx
+++ b/Source/cmGlobalVisualStudio6Generator.cxx
@@ -299,7 +299,7 @@ void cmGlobalVisualStudio6Generator::WriteProject(std::ostream& fout,
fout << "Package=<5>\n{{{\n}}}\n\n";
fout << "Package=<4>\n";
fout << "{{{\n";
- VSDependSet const& depends = this->VSTargetDepends[target->Target];
+ VSDependSet const& depends = this->VSTargetDepends[target];
for(VSDependSet::const_iterator di = depends.begin();
di != depends.end(); ++di)
{
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx
index 77c8fc8..3152e91 100644
--- a/Source/cmGlobalVisualStudio71Generator.cxx
+++ b/Source/cmGlobalVisualStudio71Generator.cxx
@@ -206,7 +206,7 @@ cmGlobalVisualStudio71Generator
const std::string&,
const char*, cmGeneratorTarget const* target)
{
- VSDependSet const& depends = this->VSTargetDepends[target->Target];
+ VSDependSet const& depends = this->VSTargetDepends[target];
for(VSDependSet::const_iterator di = depends.begin();
di != depends.end(); ++di)
{
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 972188f..b2ad365 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -730,7 +730,7 @@ cmGlobalVisualStudio7Generator
{
int depcount = 0;
std::string dspguid = this->GetGUID(dspname);
- VSDependSet const& depends = this->VSTargetDepends[target->Target];
+ VSDependSet const& depends = this->VSTargetDepends[target];
for(VSDependSet::const_iterator di = depends.begin();
di != depends.end(); ++di)
{
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 39a7bda..eb6a4ef 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -380,7 +380,7 @@ bool cmGlobalVisualStudioGenerator::ComputeTargetDepends()
for(std::vector<cmGeneratorTarget*>::iterator ti = targets.begin();
ti != targets.end(); ++ti)
{
- this->ComputeVSTargetDepends(*(*ti)->Target);
+ this->ComputeVSTargetDepends(*ti);
}
}
}
@@ -394,13 +394,14 @@ static bool VSLinkable(cmGeneratorTarget const* t)
}
//----------------------------------------------------------------------------
-void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(cmTarget& target)
+void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(
+ cmGeneratorTarget* target)
{
- if(this->VSTargetDepends.find(&target) != this->VSTargetDepends.end())
+ if(this->VSTargetDepends.find(target) != this->VSTargetDepends.end())
{
return;
}
- VSDependSet& vsTargetDepend = this->VSTargetDepends[&target];
+ VSDependSet& vsTargetDepend = this->VSTargetDepends[target];
// VS <= 7.1 has two behaviors that affect solution dependencies.
//
// (1) Solution-level dependencies between a linkable target and a
@@ -420,19 +421,18 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(cmTarget& target)
// leaving them out for the static library itself but following them
// transitively for other targets.
- bool allowLinkable = (target.GetType() != cmState::STATIC_LIBRARY &&
- target.GetType() != cmState::SHARED_LIBRARY &&
- target.GetType() != cmState::MODULE_LIBRARY &&
- target.GetType() != cmState::EXECUTABLE);
+ bool allowLinkable = (target->GetType() != cmState::STATIC_LIBRARY &&
+ target->GetType() != cmState::SHARED_LIBRARY &&
+ target->GetType() != cmState::MODULE_LIBRARY &&
+ target->GetType() != cmState::EXECUTABLE);
- cmGeneratorTarget* gt = this->GetGeneratorTarget(&target);
- TargetDependSet const& depends = this->GetTargetDirectDepends(gt);
+ TargetDependSet const& depends = this->GetTargetDirectDepends(target);
// Collect implicit link dependencies (target_link_libraries).
// Static libraries cannot depend on their link implementation
// due to behavior (2), but they do not really need to.
std::set<cmTarget const*> linkDepends;
- if(target.GetType() != cmState::STATIC_LIBRARY)
+ if(target->GetType() != cmState::STATIC_LIBRARY)
{
for(TargetDependSet::const_iterator di = depends.begin();
di != depends.end(); ++di)
@@ -460,9 +460,9 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(cmTarget& target)
// Collect all targets linked by this target so we can avoid
// intermediate targets below.
TargetSet linked;
- if(target.GetType() != cmState::STATIC_LIBRARY)
+ if(target->GetType() != cmState::STATIC_LIBRARY)
{
- linked = this->GetTargetLinkClosure(gt);
+ linked = this->GetTargetLinkClosure(target);
}
// Emit link dependencies.
diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h
index f0bc5dc..0b0b7b1 100644
--- a/Source/cmGlobalVisualStudioGenerator.h
+++ b/Source/cmGlobalVisualStudioGenerator.h
@@ -122,9 +122,9 @@ protected:
virtual bool ComputeTargetDepends();
class VSDependSet: public std::set<std::string> {};
- class VSDependMap: public std::map<cmTarget const*, VSDependSet> {};
+ class VSDependMap: public std::map<cmGeneratorTarget const*, VSDependSet> {};
VSDependMap VSTargetDepends;
- void ComputeVSTargetDepends(cmTarget&);
+ void ComputeVSTargetDepends(cmGeneratorTarget *);
bool CheckTargetLinks(cmTarget& target, const std::string& name);
std::string GetUtilityForTarget(cmTarget& target, const std::string&);