[cmake-developers] [CMake 0012619]: cmDependsC class Scan ignore same file name

Mantis Bug Tracker mantis at public.kitware.com
Mon Dec 12 02:12:34 EST 2011


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=12619 
====================================================================== 
Reported By:                chizhong jin
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   12619
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2011-12-12 02:12 EST
Last Modified:              2011-12-12 02:12 EST
====================================================================== 
Summary:                    cmDependsC class Scan ignore same file name
Description: 
cmDependsC use cache for speed up dependences scan. But produce a bug.
When you have two or more file with same name in different directories.
cmDependsC will miss some of file.

Steps to Reproduce: 
create src tree like this.
xxx/
   t.h
   a.h
   src/
      a.h
      a.cpp
a.cpp include ../t.h && a.h
t.h include a.h
create a CMakeLists.txt "add_executable(a a.cpp)"
then in xxx do
$ mkdir build && cd build && cmake ../src && make
$ cat CMakeFiles/a.dir/depend.internal

we get result like:
CMakeFiles/a.dir/a.cpp.o
 /home/jcz/Desktop/src/test/cmake/samefilename/src/../t.h
 /home/jcz/Desktop/src/test/cmake/samefilename/src/a.cpp
 /home/jcz/Desktop/src/test/cmake/samefilename/src/a.h

no ../a.h
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-12-12 02:12 chizhong jin   New Issue                                    
======================================================================




More information about the cmake-developers mailing list