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

Stephen Kelly steveire at gmail.com
Wed Jan 30 10:57:02 EST 2013


Brad King wrote:

> On 01/30/2013 03:15 AM, Stephen Kelly wrote:
>> Brad King wrote:
>> 
>>>> I've implemented it in the tll-includes-defines branch in my clone.
>>>> I've only tested it manually though.
>>>
>>> Yes, that looks good.  Please add tests covering each case:
>> 
>> I've pushed it again to my clone.
>> 
>> Once the fix-target-property-commands topic is in master, we can rebase
>> it if needed and get it merged to next.
> 
> I just tried your branch with a simple test case:

> It works, but then uncommenting the marked line to tll a non-target
> produces:
> 
> -- bar.INTERFACE_INCLUDE_DIRECTORIES =
> [$<TARGET_PROPERTY:foo,INTERFACE_INCLUDE_DIRECTORIES>;
$<$<TARGET_DEFINED:m>:$<TARGET_PROPERTY:m,INTERFACE_INCLUDE_DIRECTORIES>>]
> CMake Error at CMakeLists.txt:16 (export):
>   $<TARGET_PROPERTY:m,prop> requires its first parameter to be a reachable
>   target.

That was fixed in fix-TARGET_PROPERTY-extraction, which was merged 
yesterday.

Now that fix-target-property-commands was merged to master, I've rebased 
tll-includes-defines to master and your testcase works.

Thanks,

Steve.





More information about the cmake-developers mailing list