[cmake-developers] target_include_directories branch in stage
Brad King
brad.king at kitware.com
Mon Jan 9 09:15:12 EST 2012
On 1/8/2012 11:47 AM, Stephen Kelly wrote:
> On 12/05/2011 03:17 PM, Brad King wrote:
>> I think the property
>> can be stored just like any other property during configuration. Then
>> the generators can use ExpandListArguments.
>
> Would that mean that every generator would have to ensure that the includes
> were unique etc?
Yes but there could be an internal API provided by cmTarget to compute the
expansion in one place for use by any generator. I really think that all
property values should be handled in the same way and interpreted in their
non-string format only as needed.
>> Initialization from the
>> directory property value can just be added to cmTarget::SetMakefile:
>>
>> this->SetPropertyDefault("INCLUDE_DIRECTORIES", 0);
>
> SetPropertyDefault is for initializing a property with the content of the
> property with the same name with a "CMAKE_" prefix.
Sorry, my bad. You're right, except that it looks for a *variable* with the
CMAKE_ prefix. Instead you can just spell out initialization of the target
property by copying the current value of the directory property.
-Brad
More information about the cmake-developers
mailing list