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

Brad King brad.king at kitware.com
Mon Jan 28 14:46:14 EST 2013


On 01/28/2013 02:30 PM, Brad King wrote:
> Can we consider using syntax to make this unambiguous?
> 
> What's missing is a concise syntax to say that a string *is* a target.
> One could write
> 
>  $<TARGET_PROPERTY:bar,INTERFACE_COMPILE_DEFINITIONS>
> 
> but that exposes the plumbing.  Ideas?

Actually solving this would solve the ambiguity problem by allowing
us to require special syntax for referencing targets from tid and tcd.

This may also address Alex's concern over in

 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/5904/focus=5945

On 01/28/2013 01:05 PM, Alexander Neundorf wrote:
> Is it maybe a bit inconsistent that
> - to setup linking, I can use tll() with targets and with paths
> - to setup include dirs, I can use tll() with targets, or tid() with targets
> and directories, or id() with directories
>
> Should include_directories() maybe also be taught to recognize targets ?
>
> I mean, it kind of makes sense that tll() does not (will not) handle
> directories for setting up include dirs, but I'm still not sure I like that
> tll() will handle linking completely and partly setting up the includes.

What if only tll continues to allow raw target names and tid and tcd
assume non-target without using a generator expression?  In the common
use case tll will now do linking/includes/defines for targets anyway so
we will need tid and tcd only for real raw dirs/defs.

-Brad



More information about the cmake-developers mailing list