[cmake-developers] [CMake 0015602]: Multiple configure_file calls with same input file cause Ninja to output spurious warning
Mantis Bug Tracker
mantis at public.kitware.com
Wed Jun 3 12:01:40 EDT 2015
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 at 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 at fortuna on /dev/pts/2] 612 ~/tmp/cftest
$ ls -R
.:
cftest.json CMakeLists.txt sub/
./sub:
CMakeLists.txt
[branch at 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 at fortuna on /dev/pts/2] 614 ~/tmp/cftest
$ cat sub/CMakeLists.txt
configure_file(../cftest.json cftest2.json COPYONLY)
[branch at fortuna on /dev/pts/2] 615 ~/tmp/cftest
$ mkdir ../cfbuild && cd ../cfbuild
[branch at 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 at 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
======================================================================
More information about the cmake-developers
mailing list