The following issue has been SUBMITTED. ====================================================================== https://public.kitware.com/Bug/view.php?id=15968 ====================================================================== Reported By: Chris Assigned To: ====================================================================== Project: CMake Issue ID: 15968 Category: CMake Reproducibility: always Severity: major Priority: high Status: new ====================================================================== Date Submitted: 2016-02-10 12:13 EST Last Modified: 2016-02-10 12:13 EST ====================================================================== Summary: Ninja generator is non-deterministic Description: CMake's Ninja generator is non-deterministic on our project (LLVM). This is trivially reproducible by configuring llvm into a clean directory multiple times and comparing the results.
This is a very real problem for our project because the nondeterminism in the generated ninja build seems to be the cause of non-determinism in our build outputs. One of the important methods of compiler testing is what we call a 3-stage build. The process is basically: (1) build clang (2) use clang from step 1 to build clang again (3) use clang from step 2 to build clang again (4) ensure clang from step 2 and clang from step 3 are binary identical Today this works using the CMake Unix Makefile generator, but not using the Ninja generator. This issue reproduces on CMake 3.4.x and CMake 3.5.0 rc1. I assume it probably goes back quite a long ways too. Steps to Reproduce: mkdir scratch cd scratch cmake -G Ninja <path to llvm> cp build.ninja .. rm -rf cmake -G Ninja <path to llvm> diff build.ninja ../build.ninja ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2016-02-10 12:13 Chris New Issue ====================================================================== -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers