The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=15602 ====================================================================== Reported By: arlbranch Assigned To: ====================================================================== Project: CMake Issue ID: 15602 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2015-06-03 12:01 EDT Last Modified: 2015-06-03 12:01 EDT ====================================================================== Summary: Multiple configure_file calls with same input file cause Ninja to output spurious warning Description: Multiple calls to configure_file with the same input file but from different CMakeLists.txt files causes ninja to output the following: warning: multiple rules generate .... builds involving this target will not be correct; continuing anyway
Complete Example: ================= [branch@fortuna on /dev/pts/2] 611 ~/tmp/cftest $ cmake --version cmake version 3.2.3 CMake suite maintained and supported by Kitware (kitware.com/cmake). [branch@fortuna on /dev/pts/2] 612 ~/tmp/cftest $ ls -R .: cftest.json CMakeLists.txt sub/ ./sub: CMakeLists.txt [branch@fortuna on /dev/pts/2] 613 ~/tmp/cftest $ cat CMakeLists.txt cmake_minimum_required(VERSION 3.2) project(cftest) configure_file(cftest.json cftest1.json COPYONLY) add_subdirectory(sub) [branch@fortuna on /dev/pts/2] 614 ~/tmp/cftest $ cat sub/CMakeLists.txt configure_file(../cftest.json cftest2.json COPYONLY) [branch@fortuna on /dev/pts/2] 615 ~/tmp/cftest $ mkdir ../cfbuild && cd ../cfbuild [branch@fortuna on /dev/pts/2] 616 ~/tmp/cfbuild $ cmake -G Ninja ../cftest -- The C compiler identification is GNU 5.1.0 -- The CXX compiler identification is GNU 5.1.0 -- Check for working C compiler using: Ninja -- Check for working C compiler using: Ninja -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler using: Ninja -- Check for working CXX compiler using: Ninja -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done -- Build files have been written to: /home/branch/tmp/cfbuild [branch@fortuna on /dev/pts/2] 617 ~/tmp/cfbuild $ ninja ninja: warning: multiple rules generate /home/branch/tmp/cftest/cftest.json. builds involving this target will not be correct; continuing anyway ninja: no work to do. Steps to Reproduce: 1) Create the project in the Description 2) Configure with the Ninja generator 3) build with ninja ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-06-03 12:01 arlbranch 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