[cmake-developers] [CMake] 2.8.11-rc3 generator expression error
Brad King
brad.king at kitware.com
Thu Apr 25 20:33:51 EDT 2013
On 4/25/2013 6:15 PM, Stephen Kelly wrote:
> Brad King wrote:
>> Why can't GetIncludeDirectories just evaluate it->Value as a
>> genex with the current configuration, and if it is a valid target
>> name then lookup its INTERFACE_INCLUDE_DIRECTORIES and use that
>> immediately?
>
> Good question. Reading the code, I can't see any reason it needs to be that
> way.
I looked into implementing this and realized that we're not propagating
usage requirements from the entire link closure, only from the direct
dependencies. In an earlier design iteration the transitive requirements
were brought in by evaluation of the interface properties themselves.
Now that tll() doesn't touch the properties and the requirements are
simply appended during generation we need to use the full link closure.
I've drafted a change to convert cmTarget::GetIncludeDirectories and
cmTarget::GetCompileDefinitions over to share a common internal usage
requirements API that uses GetLinkInformation to get the transitive link
closure and looks up the INTERFACE_* properties in every linked target.
The caching is simplified because we never need to clear it since these
are now only called during generation and never during configuration.
I'll report back after doing more testing.
Thanks,
-Brad
More information about the cmake-developers
mailing list