summaryrefslogtreecommitdiff
path: root/Source/cmGlobalVisualStudioGenerator.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-08-24 18:47:56 -0400
committerBrad King <brad.king@kitware.com>2010-08-24 18:47:56 -0400
commit79a88c35f886258a43ee6169d2d7b4f2e1eb0b95 (patch)
treec44185016a16e3fc10cc4c9dc8e6e874548adfcc /Source/cmGlobalVisualStudioGenerator.h
parent325bdb2a92bbbbe18ae2cbffc000bd6e0dd0367a (diff)
downloadcmake-79a88c35f886258a43ee6169d2d7b4f2e1eb0b95.tar.gz
Refactor VS <= 7.1 utility-depends workaround
Commit 438a7e2f (Fix utility dependencies for static libraries in VS generators, 2007-04-04) implemented utility-only dependencies between linkable targets by introducing an intermediate non-linkable target. We convert a dependency of the form foo -> bar to the form foo -> bar_UTILITY -> bar to prevent foo from including bar on its link line. Previously we added the extra "_UTILITY" targets explicitly among the project targets before dependency analysis was performed. Now we generate them separately at the last moment so that cmGlobalGenerator need not be aware of them.
Diffstat (limited to 'Source/cmGlobalVisualStudioGenerator.h')
-rw-r--r--Source/cmGlobalVisualStudioGenerator.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h
index 3d499e38fb..daa6b3a20d 100644
--- a/Source/cmGlobalVisualStudioGenerator.h
+++ b/Source/cmGlobalVisualStudioGenerator.h
@@ -61,7 +61,6 @@ public:
// return true if target is fortran only
bool TargetIsFortranOnly(cmTarget& t);
- const char* GetUtilityForTarget(cmTarget& target, const char*);
/** Get the top-level registry key for this VS version. */
std::string GetRegistryBase();
@@ -71,8 +70,6 @@ public:
virtual bool IsMultiConfig() { return true; }
protected:
- void FixUtilityDepends();
-
// Does this VS version link targets to each other if there are
// dependencies in the SLN file? This was done for VS versions
// below 8.
@@ -90,9 +87,6 @@ protected:
OrderedTargetDependSet(cmGlobalGenerator::TargetDependSet const&);
};
- virtual void GetTargetSets(TargetDependSet& projectTargets,
- TargetDependSet& originalTargets,
- cmLocalGenerator* root, GeneratorVector const&);
virtual bool ComputeTargetDepends();
class VSDependSet: public std::set<cmStdString> {};
class VSDependMap: public std::map<cmTarget*, VSDependSet> {};
@@ -100,9 +94,11 @@ protected:
void ComputeVSTargetDepends(cmTarget&);
bool CheckTargetLinks(cmTarget& target, const char* name);
-private:
- void FixUtilityDependsForTarget(cmTarget& target);
- void CreateUtilityDependTarget(cmTarget& target);
+ std::string GetUtilityForTarget(cmTarget& target, const char*);
+ virtual std::string WriteUtilityDepend(cmTarget*) = 0;
+ std::string GetUtilityDepend(cmTarget* target);
+ typedef std::map<cmTarget*, cmStdString> UtilityDependsMap;
+ UtilityDependsMap UtilityDepends;
};
#endif