MantisBT - CMake
View Issue Details
0008581CMakeCMakepublic2009-02-22 17:242009-03-10 17:39
Mark de Wever 
Alex Neundorf 
normalfeatureN/A
closedfixed 
CMake-2-6 
 
0008581: automatically find header files for a c/c++ project
In this post [1] on the Wesnoth dev-ml Alexander Neundorf suggested to post this feature request here.

It would be nice if cmake would be able to automatically try to find a header file belonging to a c/cpp/cxx file. When this file is found it can be added to project based files like MSVC and C::B. This reduces maintenance, since you don't need to add the header files manually and Makefile based projects don't need them. For project based systems it still allows you to easily edit the header file.

[1] https://mail.gna.org/public/wesnoth-dev/2009-02/msg00042.html [^]
No tags attached.
Issue History
2009-02-22 17:24Mark de WeverNew Issue
2009-02-23 16:08Bill HoffmanNote Added: 0015297
2009-02-23 16:08Bill HoffmanStatusnew => assigned
2009-02-23 16:08Bill HoffmanAssigned To => Alex Neundorf
2009-03-10 17:39Alex NeundorfNote Added: 0015622
2009-03-10 17:39Alex NeundorfStatusassigned => closed
2009-03-10 17:39Alex NeundorfResolutionopen => fixed

Notes
(0015297)
Bill Hoffman   
2009-02-23 16:08   
I think this would be hard to implement without a serious performance issues. CMake would have to parse the source files at CMake time, and how would you figure out which header files to include in the project? I think the currently manual process is the only workable way of doing this.
(0015622)
Alex Neundorf   
2009-03-10 17:39   
I implemented something for the CodeBlocks generator.
If there is a file <SRCDIR>/foo.[c|cxx|cpp|cc|c++|C] in the project, it automatically adds <SRCDIR>/foo.[h|hpp|hcc|hh] also to the project if it exists.

Alex