[cmake-developers] [CMake 0015003]: depend.make ignores files with the same name
Mantis Bug Tracker
mantis at public.kitware.com
Wed Jul 2 16:29:57 EDT 2014
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=15003
======================================================================
Reported By: Ryan Curtin
Assigned To:
======================================================================
Project: CMake
Issue ID: 15003
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2014-07-02 16:29 EDT
Last Modified: 2014-07-02 16:29 EDT
======================================================================
Summary: depend.make ignores files with the same name
Description:
I've attached an interesting project that exposes a bug that is similar (but
maybe not identical) to http://public.kitware.com/Bug/view.php?id=9354 . This
occurred while working on mlpack ( http://www.mlpack.org/ ) which uses CMake,
but I have reduced it to the simplest case I can think of.
We have a test file, 'test.cpp', which includes two files 'a.hpp' and 'b.hpp'.
The file 'a.hpp' includes 'a/a.hpp' which in turn includes 'impl.hpp' located in
the directory a/. The file 'b.hpp' includes 'b/b.hpp' which in turn includes
'impl.hpp' located in the directory b/.
Then, the CMake configuration just makes a target 'test' that depends on
test.cpp, and ideally CMake should figure out all the header dependencies
correctly.
However, when CMake is used to configure and build the target, the resulting
depend.make file associated with the test target only contains a/impl.hpp and
not b/impl.hpp. This means I can make changes to b/impl.hpp and recompile, but
CMake does not detect the changes.
Unfortunately I am not enough of a CMake expert to provide a patch, but I
thought it would at least be useful to reproduce the issue.
Steps to Reproduce:
1. unpack attached .tar.gz
2. use CMake to configure it
3. build the test target
4. run ./test, look, the output is complaints
5. modify b/impl.hpp and add vulgarities
6. make test
7. run ./test... no vulgarities!
Additional Information:
I tried with both CMake 2.8 and 3.0, so it is tested against the latest stable
release of CMake in both the 2.x and 3.x branches.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-07-02 16:29 Ryan Curtin New Issue
2014-07-02 16:29 Ryan Curtin File Added: cmake-test.tar.gz
======================================================================
More information about the cmake-developers
mailing list