View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015602CMakeCMakepublic2015-06-03 12:012016-06-10 14:31
Reporterarlbranch 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
Platformx86_64OSLinuxOS Version4.0.4-2-ARCH
Product VersionCMake 3.2.3 
Target VersionFixed in Version 
Summary0015602: Multiple configure_file calls with same input file cause Ninja to output spurious warning
DescriptionMultiple 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 Reproduce1) Create the project in the Description
2) Configure with the Ninja generator
3) build with ninja
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0042790)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2015-06-03 12:01 arlbranch New Issue
2016-06-10 14:29 Kitware Robot Note Added: 0042790
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team