[CMake] Implicity CMAKE_CURRENT_BINARY_DIR include_directories

Alexander Neundorf a.neundorf-work at gmx.net
Fri May 8 14:06:48 EDT 2009


On Thursday 07 May 2009, Mike Arthur wrote:
> I'm sure I read some time about some option you could set in a CMake
> project that would always implicitly do
> include_directories(${CMAKE_CURRENT_BINARY_DIR}) in child CMakeLists.txt
> without the need to do so manually.
>
> Searched the documentation to no avail. Did I just imagine this option or
> is it there somewhere?

Maybe it was in kdelibs/cmake/modules/KDE4Defaults.cmake:

# Always include srcdir and builddir in include path
# This saves typing ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} in 
about every subdir
# since cmake 2.4.0
set(CMAKE_INCLUDE_CURRENT_DIR ON)

Ooops, seems it's not documented.
I'll fix that.

Alex


More information about the CMake mailing list