/usr/include priority vs custom include paths

Andreas Pakulat apaku at gmx.de
Sun Oct 30 08:14:56 GMT 2011


On 29.10.11 20:24:13, Mateusz Łoskot wrote:
> Hi,
> 
> I use two versions of Boost C++ libraries installed.
> Boost 1.42 installed from .deb packages with headers in /usr/include.
> Current Boost trunk with headers in my workshop folders inside $HOME.
> Namely, in /home/mloskot/dev/boost/_svn/trunk.
> 
> I have configured "Custom include paths" this way:
> 
> http://www.flickr.com/photos/mloskot/6291933457/

Oh that one is new, great that once again someone needed to invent a
gui again instead of re-using some existing :|

> My CMakeLists.txt however adds include directory from my Boost trunk location.

Why? If you open a cmake project in kdevelop kdevelop will automatically
pick up all include directories as configured in cmake (except for some
bugs of course).

> The parser reports searched include path a follows:
> 
> 1. project directory, which is in my case /home/mloskot/workshop/boost
> 2. then /usr/include
> 3. custom include paths: /home/mloskot/dev/boost/_svn/trunk
> 4. other /usr/... includes

If you're using a cmake-based project and kdevelop picks up includes
from cmake, then this is wrong. For any given header file the cmake
plugin must be able to report the exact include's for that file and the
c++ support must use only those for searching. Anything else is a bug in
either of the two plugins.

Andreas





More information about the KDevelop mailing list