[cmake-developers] Interface includes and defines plumbing

Brad King brad.king at kitware.com
Mon Jan 7 15:24:29 EST 2013


On 01/07/2013 02:50 PM, Stephen Kelly wrote:
> I've pushed two new branches to my gitorious clone.
> 
>  include-dirs-convenience
> 
> For the same reason that CMAKE_INCLUDE_CURRENT_DIR exists, but for 
> interfaces. Please let me know what you think about the idea and API.

The CMAKE_BUILD_INTERFACE_INCLUDES approach looks good.  The name
reserves room for other auto-BUILD_INTERFACE values in the future.

The install-tree equivalent is a neat idea.  Upon first reading the
test call with "INCLUDES DESTINATION" I wasn't sure whether it was
trying to install some kind of "associated headers" list or something.
Perhaps the word "INTERFACE" should appear here to make sure it is
clear that it is setting an interface on the installed target.  I
wonder if we should hold off on this convenience interface until more
of the new usage interface magic is worked out.  We may be able to
find an even more convenient way to set a whole bunch of stuff on
an installed target's interface.

>  target-includes-defines-commands
> 
> For primary population of interface and non-interface includes and defines. 
> The target_include_directories command will also be useful to 'correct' the 
> order of includes in the future when that is done at the same time as link 
> libs population.

It looks like the signatures have exactly one visibility keyword.
Shouldn't they allow the keyword to be repeated so that the entire
internal and external values can be specified in a single command?

The new commands do not need to be included in the bootstrap build.
We won't be using them in CMake's own rules for a while.

Thanks,
-Brad



More information about the cmake-developers mailing list