[cmake-developers] target_include_directories branch in stage

Brad King brad.king at kitware.com
Wed Nov 30 09:02:29 EST 2011


On 11/29/2011 2:28 PM, Alexander Neundorf wrote:
> ...a somewhat related idea: if it will be possible to set include
> directories per target, and since it is already possible to set compile flags
> per target, it would be nice if I could also set a property on targets which
> keeps them from using the global settings at all.

The design for the new INCLUDE_DIRECTORIES property allows this.  After the last
include_directories() call in a directory one may set the INCLUDE_DIRECTORIES
property of any target to anything and overwrite whatever came from the directory.

In the current design the property is initialized when the target is created
to the current directory-level value.  Then each additional include_directories()
call appends to the dir-level value *and* the targets in the directory.  Perhaps
the latter could be disabled by a property like you propose.

-Brad



More information about the cmake-developers mailing list