diff options
author | Fred Baksik <frodak17@gmail.com> | 2019-01-05 16:01:20 (GMT) |
---|---|---|
committer | Fred Baksik <frodak17@gmail.com> | 2019-01-16 15:41:11 (GMT) |
commit | 447b57a2676b5bb7e9f97b15c9fe5fe7d3817a86 (patch) | |
tree | 4cd8cbcbaac3227afbc48893afaeef8856c37924 /Source/cmLocalGhsMultiGenerator.cxx | |
parent | 6436080996ae6f2482fdeefcc639dc36fefedfd8 (diff) | |
download | CMake-447b57a2676b5bb7e9f97b15c9fe5fe7d3817a86.zip CMake-447b57a2676b5bb7e9f97b15c9fe5fe7d3817a86.tar.gz CMake-447b57a2676b5bb7e9f97b15c9fe5fe7d3817a86.tar.bz2 |
GHS: Update binary structure so that install scripts work
GHS doesn't follow the binary structure that VS or Makefiles use
Also setting binary location outputs do not work
-- Update to act like Visual Studio Generator and use its project layout
-- Fix open/close issues where open() was used instead of Open()
Now passes the file handle to all function that require it
-- Avoid triggering MULTI reloads; use SetCopyIfDifferent mode
Diffstat (limited to 'Source/cmLocalGhsMultiGenerator.cxx')
-rw-r--r-- | Source/cmLocalGhsMultiGenerator.cxx | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/Source/cmLocalGhsMultiGenerator.cxx b/Source/cmLocalGhsMultiGenerator.cxx index ab6774e..3679c3e 100644 --- a/Source/cmLocalGhsMultiGenerator.cxx +++ b/Source/cmLocalGhsMultiGenerator.cxx @@ -18,16 +18,32 @@ cmLocalGhsMultiGenerator::~cmLocalGhsMultiGenerator() { } -void cmLocalGhsMultiGenerator::Generate() +void cmLocalGhsMultiGenerator::GenerateTargetsDepthFirst( + cmGeneratorTarget* target, std::vector<cmGeneratorTarget*>& remaining) { - const std::vector<cmGeneratorTarget*>& tgts = this->GetGeneratorTargets(); + if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) { + return; + } + // Find this target in the list of remaining targets. + auto it = std::find(remaining.begin(), remaining.end(), target); + if (it == remaining.end()) { + // This target was already handled. + return; + } + // Remove this target from the list of remaining targets because + // we are handling it now. + *it = nullptr; - for (std::vector<cmGeneratorTarget*>::const_iterator l = tgts.begin(); - l != tgts.end(); ++l) { - if ((*l)->GetType() == cmStateEnums::INTERFACE_LIBRARY) { - continue; + cmGhsMultiTargetGenerator tg(target); + tg.Generate(); +} + +void cmLocalGhsMultiGenerator::Generate() +{ + std::vector<cmGeneratorTarget*> remaining = this->GetGeneratorTargets(); + for (auto& t : remaining) { + if (t) { + GenerateTargetsDepthFirst(t, remaining); } - cmGhsMultiTargetGenerator tg(*l); - tg.Generate(); } } |