diff options
author | Brad King <brad.king@kitware.com> | 2015-09-22 14:14:49 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-09-22 14:25:58 (GMT) |
commit | 03bfe71ae055ed9e5dbeb619967ee44e5f555459 (patch) | |
tree | fd1344e66b17d48cc94e4c3901373e657d67bbd6 /Source/cmGlobalVisualStudioGenerator.h | |
parent | dce7d8befb94e2531d6c7d68b78b4b4a67ca024f (diff) | |
download | CMake-03bfe71ae055ed9e5dbeb619967ee44e5f555459.zip CMake-03bfe71ae055ed9e5dbeb619967ee44e5f555459.tar.gz CMake-03bfe71ae055ed9e5dbeb619967ee44e5f555459.tar.bz2 |
VS: Refactor target ordering logic
Refactor cmGlobalVisualStudioGenerator::TargetCompare to store the name of
the target that should come first instead of hard-coding "ALL_BUILD".
Update client sites to specify "ALL_BUILD" when ordering for .sln files
and an empty string otherwise (in cases when "ALL_BUILD" should not be
encountered anyway).
Diffstat (limited to 'Source/cmGlobalVisualStudioGenerator.h')
-rw-r--r-- | Source/cmGlobalVisualStudioGenerator.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index 64440ad..c940eb3 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -89,8 +89,11 @@ public: virtual bool TargetsWindowsCE() const { return false; } class TargetSet: public std::set<cmTarget const*> {}; - struct TargetCompare + class TargetCompare { + std::string First; + public: + TargetCompare(std::string const& first): First(first) {} bool operator()(cmGeneratorTarget const* l, cmGeneratorTarget const* r) const; }; @@ -151,11 +154,14 @@ class cmGlobalVisualStudioGenerator::OrderedTargetDependSet: public std::multiset<cmTargetDepend, cmGlobalVisualStudioGenerator::TargetCompare> { + typedef std::multiset<cmTargetDepend, + cmGlobalVisualStudioGenerator::TargetCompare> + derived; public: typedef cmGlobalGenerator::TargetDependSet TargetDependSet; typedef cmGlobalVisualStudioGenerator::TargetSet TargetSet; - OrderedTargetDependSet(TargetDependSet const&); - OrderedTargetDependSet(TargetSet const&); + OrderedTargetDependSet(TargetDependSet const&, std::string const& first); + OrderedTargetDependSet(TargetSet const&, std::string const& first); }; #endif |