[CMake] CMAKE_INCLUDE_CURRENT_DIR only for out-of-source ?
Brad King
brad.king at kitware.com
Tue Mar 21 08:46:32 EST 2006
Alexander Neundorf wrote:
>>Von: Brad King <brad.king at kitware.com>
>>The idea of that option was to make *double-quote* includes look the
>>same for in-source and out-of-source builds. For angle-bracket
>>includes only the explicitly given include path should be used.
>>
>>Note in your example that running just
>>
>> gcc main.c
>>
>>will not work.
>
>
> Yes.
> But this means that the only thing this does for us is that we can use
>
> INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
>
> instead of
>
> INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}
> ${CMAKE_CURRENT_BINARY_DIR})
>
> which isn't *that* much of a help.
All the examples given to me when requesting the feature used
double-quote includes. For those it is alot of help because then no
include_directories command is needed at all.
> Also the name
> "CMAKE_INCLUDE_CURRENT_DIR" suggests that then the current dir will be
> part of the include path. But as it is now, this is only true for
> out-of-source builds.
Given the name and that this isn't the default anyway I've updated the
feature to be enabled for both in-source and out-of-source builds.
-Brad
More information about the CMake
mailing list