diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2021-06-24 09:42:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-07-08 19:16:46 (GMT) |
commit | 9e9ab61e2ff248cd7b0b702decd4f967cd7becdf (patch) | |
tree | b01d87c5a2b6788fec64b3985fead6d4e6268917 /Source/cmGlobalGenerator.cxx | |
parent | 8a812dde61e0c309184100ef5d80fb2047c7d6b0 (diff) | |
download | CMake-9e9ab61e2ff248cd7b0b702decd4f967cd7becdf.zip CMake-9e9ab61e2ff248cd7b0b702decd4f967cd7becdf.tar.gz CMake-9e9ab61e2ff248cd7b0b702decd4f967cd7becdf.tar.bz2 |
cmGlobalGenerator: Process targets in a stable order
`cmMakefile::Targets` is meant for efficient lookup but does not
have a stable order. Use `cmMakefile::OrderedTargets` instead.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 5d3fdce..15a7304 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1781,9 +1781,8 @@ void cmGlobalGenerator::CreateGeneratorTargets( std::map<cmTarget*, cmGeneratorTarget*> const& importedMap) { if (targetTypes == AllTargets) { - for (auto& target : mf->GetTargets()) { - cmTarget* t = &target.second; - lg->AddGeneratorTarget(cm::make_unique<cmGeneratorTarget>(t, lg)); + for (cmTarget* target : mf->GetOrderedTargets()) { + lg->AddGeneratorTarget(cm::make_unique<cmGeneratorTarget>(target, lg)); } } |