[cmake-developers] Setting includes, defines and other usage requirements with one command

Brad King brad.king at kitware.com
Tue Jan 29 16:19:28 EST 2013


On 01/29/2013 03:31 PM, Alexander Neundorf wrote:
> On Tuesday 29 January 2013, Stephen Kelly wrote:
>> Also, just to shortcut a possible discussion point - this issue is
>> independent of whether tll() adds includes or a new command is added. If a
>> downstream is using a new command before the upstream adds
>> INTERFACE_INCLUDE_DIRECTORIES, the exact same issue comes up. Just to be
>> clear.
> 
> A new command could ... require keywords to denote whether the target is
> supposed to be used only for linking or for linking and include dirs.

Yes, a new command could have syntax or keywords to select which pieces
of the interface to use.  If a requested piece does not exist then it
is an error.  If a non-requested piece exists it is not used anyway.

This basically brings us back to the current (pre-usage-reqs) situation
where every part is its own variable/command.  It just puts everything
inside the new command call instead of calls to separate commands.

The proposed solution is to instead have upstreams use interface version
numbers to decide what parts of the interface to populate based on the
version that the downstream expects.  This is simpler for downstreams,
which is the goal of Steve's work.

-Brad



More information about the cmake-developers mailing list