[cmake-developers] Toward a more deterministic ninja generator

Brad King brad.king at kitware.com
Thu Jun 16 13:14:50 EDT 2016


On 06/14/2016 11:18 AM, Nicolas Desprès wrote:
> It makes the ninja generator more deterministic by sorting the
> build edge's inputs/outputs. It does not introduce any
> regression on my macbookpro.
> 
> This could help to fix issue #15968.

What examples of non-determinism have you observed after the changes
already made for that issue?

>  + // We assume that commands using $in and $out varialbes do not care
>  + // about the order of their inputs/outputs files, but commands that do
>  + // not use them do care (like custom commands for instance).

I'd prefer not to make this assumption.  CMake should order the
inputs and outputs in a deterministic way before getting to the
code in question.  If that is not happening then there may be
a deeper problem.  Sorting this late is fixing the symptom.

-Brad



More information about the cmake-developers mailing list