[CMake] KDevelop file list contains duplicate header file entries for libraries

Alexander Neundorf a.neundorf-work at gmx.net
Fri Dec 8 02:47:22 EST 2006


Von: Jens Hannemann <j.hannemann at ieee.org>

...
> This works fine with the usual Unix Makefiles generator (as a matter of
> fact, 
> I can actually drop the LIBFOO_HEADERS dependency in ADD_LIBRARY, and
> the packages and dependencies are generated just fine). But when using
> the KDevelop3 generator, the file list generated contains a duplicate
> foo.h:
> 
> # KDevelop Custom Project File List
> foo/foo.h
> CMakeLists.txt
> foo/foo.h
> libfoo/CMakeLists.txt
> libfoo/foo.cpp
> 
> When I drop the LIBFOO_HEADERS from ADD_LIBRARY, foo.h is not included
> in the file list at all. The question is:
>
> Is this a bug?

It's a feature ;-)
Since cmake 2.4.4 cmake automatically adds headers for source files to kdevelop projects, since this makes code completion work better.
It does so by checking whether for a file "path/basename.exe" also a file "path/basename.h" exists. If so, it adds this one. It probably shouldn't do this if the file is already a header or already part of the source list.
Please report a bug and assign it to me.

Bye
Alex

-- 
"Ein Herz für Kinder" - Ihre Spende hilft! Aktion: www.deutschlandsegelt.de
Unser Dankeschön: Ihr Name auf dem Segel der 1. deutschen America's Cup-Yacht!


More information about the CMake mailing list