KDE/kdelibs/cmake/modules

Brad King brad.king at kitware.com
Sun Feb 19 18:53:22 CET 2006


Alexander Neundorf wrote:
> On Saturday 18 February 2006 17:55, Brad King wrote:
>>David Faure wrote:
>>>On Thursday 16 February 2006 21:16, Brad King wrote:
>>>>For the include directories we're working on a design for optionally
>>>>enabling automatic listing of a target's source/build tree at the
>>>>beginning of the include path.
>>I've just committed changes to CMake to enable this behavior by default.
>>One can set CMAKE_NO_AUTOMATIC_INCLUDE_DIRECTORIES to disable it.
> 
> So which dirs are added automatically ?
> CMAKE_CURRENT_BINARY_DIR and CMAKE_CURRENT_SOURCE_DIR ?

If the build is out-of-source CMAKE_CURRENT_BINARY_DIR is added 
automatically.  This approximates the include file behavior for 
in-source builds with ""-style includes, at least for source files that 
are in the source directory.  Upon writing this I realize that for 
generated sources in the binary tree one needs CMAKE_CURRENT_SOURCE_DIR 
too.  I'm less comfortable adding this one automatically so I think I'll 
change things to not do this by default but add both paths if 
CMAKE_AUTOMATIC_INCLUDE_DIRECTORIES is set.  Then you can set that 
variable once at the top of KDE and get the required behavior.

-Brad


More information about the Kde-buildsystem mailing list