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                   

======================================================================

-- 

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

Reply via email to