[cmake-developers] [CMake 0014237]: Generated dependency paths may be too long for projects with relative includes

Mantis Bug Tracker mantis at public.kitware.com
Thu Jun 20 10:01:49 EDT 2013


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=14237 
====================================================================== 
Reported By:                Pavel Shramov
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14237
Category:                   CMake
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-06-20 10:01 EDT
Last Modified:              2013-06-20 10:01 EDT
====================================================================== 
Summary:                    Generated dependency paths may be too long for
projects with relative includes
Description: 
When cmake calculates dependencies for C/C++ files with relative include clauses
result paths are constructed with simple append header_path + '/' +
inner_header_path.

This leads to depend file like 

CMakeFiles/test.dir/test.c.o: ../s1/../s2/f2.h
CMakeFiles/test.dir/test.c.o: ../s1/../s2/s2.2/../../s3/f3.h
CMakeFiles/test.dir/test.c.o: ../s1/../s2/s2.2/f2.2.h
CMakeFiles/test.dir/test.c.o: ../s1/f1.h

instead of

CMakeFiles/test.dir/test.c.o: ../s1/f1.h
CMakeFiles/test.dir/test.c.o: ../s2/f2.h
CMakeFiles/test.dir/test.c.o: ../s2/s2.2/f2.2.h
CMakeFiles/test.dir/test.c.o: ../s3/f3.h

With long chain of includes it may result in broken makefiles with paths larger
then MAXPATH on win32 (260 chars).

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-06-20 10:01 Pavel Shramov  New Issue                                    
======================================================================




More information about the cmake-developers mailing list