diff options
author | Brad King <brad.king@kitware.com> | 2016-02-16 14:52:25 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-02-16 14:52:25 (GMT) |
commit | c0a0c7d3f226943818c0152bbcb9a0d026c3274e (patch) | |
tree | 9313894ba486fc205c4b9fc3e63fb36bc82cd19b | |
parent | 28126b8927353cb7da183ee61faea9bf7271b676 (diff) | |
parent | 46fa9583624b3dd2b2dad978cb0313b78eae5f53 (diff) | |
download | CMake-c0a0c7d3f226943818c0152bbcb9a0d026c3274e.zip CMake-c0a0c7d3f226943818c0152bbcb9a0d026c3274e.tar.gz CMake-c0a0c7d3f226943818c0152bbcb9a0d026c3274e.tar.bz2 |
Merge topic 'ninja-deterministic-gen'
46fa9583 Ninja: Fix non-determinism in generated target dependency order (#15968)
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 0f06e43..bb5f921 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -991,6 +991,7 @@ cmGlobalNinjaGenerator std::set<std::string> const& utils = target->GetUtilities(); std::copy(utils.begin(), utils.end(), std::back_inserter(outputs)); } else { + cmNinjaDeps outs; cmTargetDependSet const& targetDeps = this->GetTargetDirectDepends(target); for (cmTargetDependSet::const_iterator i = targetDeps.begin(); i != targetDeps.end(); ++i) @@ -999,8 +1000,10 @@ cmGlobalNinjaGenerator { continue; } - this->AppendTargetOutputs(*i, outputs); + this->AppendTargetOutputs(*i, outs); } + std::sort(outs.begin(), outs.end()); + outputs.insert(outputs.end(), outs.begin(), outs.end()); } } |