[cmake-developers] target_include_directories() accepts only absolute paths ?

Stephen Kelly steveire at gmail.com
Sun Jan 27 16:59:42 EST 2013


Alexander Neundorf wrote:
>> > Is there a reason why
>> > target_include_directories() should behave differently ?
>> 
>> That results from the semantics of the INCLUDE_DIRECTORIES property and
>> http://public.kitware.com/Bug/view.php?id=13188
> 
> Ok.
> This applies to setting the target property directly.
> But, I think target_include_directories() could still handle relative
> paths so that CMAKE_CURRENT_SOURCE_DIR is prepended before it is set as a
> target property.

Yes. However code like this would be ambiguous until generate-time:

 target_include_directories(foo PRIVATE bar)

Is bar a target or a directory? That means storing a longer string for bar:

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/5734/focus=5920

 https://gitorious.org/~steveire/cmake/steveires-
cmake/commit/6fcdd6e4d47d0469baad228a84ebb9269dceb488

I don't know if that has a big impact but it's an unfortunately long string 
to have to store for such a small input. 

We can also allow relative directories in a later release anyway. I'd prefer 
at this point to be focussed on things which do have to be in this release.

Thanks,

Steve.






More information about the cmake-developers mailing list