[Cmake-commits] CMake branch, next, updated. v3.5.0-rc2-119-g609e86f
Brad King
brad.king at kitware.com
Fri Feb 12 08:57:57 EST 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 609e86fa70ef7f00103e37fb8cf0e5e444853ae2 (commit)
via 46fa9583624b3dd2b2dad978cb0313b78eae5f53 (commit)
from e163cb5d65ea5c31d33ad543e25f8b984bc62e10 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=609e86fa70ef7f00103e37fb8cf0e5e444853ae2
commit 609e86fa70ef7f00103e37fb8cf0e5e444853ae2
Merge: e163cb5 46fa958
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Feb 12 08:57:56 2016 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Feb 12 08:57:56 2016 -0500
Merge topic 'ninja-deterministic-gen' into next
46fa9583 Ninja: Fix non-determinism in generated target dependency order (#15968)
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=46fa9583624b3dd2b2dad978cb0313b78eae5f53
commit 46fa9583624b3dd2b2dad978cb0313b78eae5f53
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Feb 12 08:45:09 2016 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Feb 12 08:51:58 2016 -0500
Ninja: Fix non-determinism in generated target dependency order (#15968)
We represent target dependency sets as `set<cmTargetDepend>` which
orders by a `cmGeneratorTarget const*` pointer value. Therefore the
order of dependencies encountered in AppendTargetDepends is not
predictable. Sort them by content to make the result deterministic.
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());
}
}
-----------------------------------------------------------------------
Summary of changes:
Source/cmGlobalNinjaGenerator.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list