summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudioGenerator.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-08-25 14:26:25 (GMT)
committerBrad King <brad.king@kitware.com>2010-11-18 15:51:34 (GMT)
commitfd614e60b51e11ac8a99c19d541be9a8e5c141dc (patch)
tree0ad96f88dd5d52d64611ebec7e5a34eba3e663b9 /Source/cmGlobalVisualStudioGenerator.h
parent605f4bc0978fd3c84bc06875aef500e62b0f41c7 (diff)
downloadCMake-fd614e60b51e11ac8a99c19d541be9a8e5c141dc.zip
CMake-fd614e60b51e11ac8a99c19d541be9a8e5c141dc.tar.gz
CMake-fd614e60b51e11ac8a99c19d541be9a8e5c141dc.tar.bz2
Use modern global dependency graph for VS < 8 deps
VS 7.1 and below have 2 behaviors that make the cmComputeTargetDepends result difficult to use for solution-level dependencies. Update the method cmGlobalVisualStudioGenerator::ComputeTargetDepends to document the behaviors and work around them. Commit 1a0c166a (Store direct dependencies in solutions for VS >= 8, 2010-08-20) isolated VS >= 8 from this computation so those versions should be unaffected. This change removes the last use of cmTarget::GetLinkLibraries for purposes other than backward compatibility with legacy interfaces (export_library_dependencies, VS 6 custom .dsp templates). Now the cmComputeTargetDepends results are used for all generators so global target dependency computation is fully centralized.
Diffstat (limited to 'Source/cmGlobalVisualStudioGenerator.h')
-rw-r--r--Source/cmGlobalVisualStudioGenerator.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h
index c8ea339..bc96f4e 100644
--- a/Source/cmGlobalVisualStudioGenerator.h
+++ b/Source/cmGlobalVisualStudioGenerator.h
@@ -69,15 +69,12 @@ public:
i.e. "Can I build Debug and Release in the same tree?" */
virtual bool IsMultiConfig() { return true; }
+ class TargetSet: public std::set<cmTarget*> {};
struct TargetCompare
{
bool operator()(cmTarget const* l, cmTarget const* r) const;
};
- class OrderedTargetDependSet: public std::multiset<cmTarget*, TargetCompare>
- {
- public:
- OrderedTargetDependSet(cmGlobalGenerator::TargetDependSet const&);
- };
+ class OrderedTargetDependSet;
protected:
// Does this VS version link targets to each other if there are
@@ -99,6 +96,24 @@ protected:
std::string GetUtilityDepend(cmTarget* target);
typedef std::map<cmTarget*, cmStdString> UtilityDependsMap;
UtilityDependsMap UtilityDepends;
+private:
+ void FollowLinkDepends(cmTarget* target, std::set<cmTarget*>& linked);
+
+ class TargetSetMap: public std::map<cmTarget*, TargetSet> {};
+ TargetSetMap TargetLinkClosure;
+ void FillLinkClosure(cmTarget* target, TargetSet& linked);
+ TargetSet const& GetTargetLinkClosure(cmTarget* target);
+};
+
+class cmGlobalVisualStudioGenerator::OrderedTargetDependSet:
+ public std::multiset<cmTargetDepend,
+ cmGlobalVisualStudioGenerator::TargetCompare>
+{
+public:
+ typedef cmGlobalGenerator::TargetDependSet TargetDependSet;
+ typedef cmGlobalVisualStudioGenerator::TargetSet TargetSet;
+ OrderedTargetDependSet(TargetDependSet const&);
+ OrderedTargetDependSet(TargetSet const&);
};
#endif