Brad King wrote:

> On 12/10/2012 09:52 AM, Stephen Kelly wrote:
>> Brad King wrote:
>> 
>>> IIRC the topic that added dependent export support was only
>>> finished for the install(EXPORT) command and not for export().
>>> It added a test for the install case mixing namespaces:
>>>
>>>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=955b9662
>>>
>>> It appears to work.
>> 
>> Yes. I refactored my topic to use the same logic/code as is used there.
> 
> Thanks.
> 
>> That involved removing the EXPORT_NAMESPACE generator and adding a new
>> $<TARGET> generator which is a preprocessor-marker accepting only
>> literals for pointing out target names. Those target names only need to
>> be extracted at export time.
>> 
>> I think the name $<TARGET> is suitable, but I don't mind changing it.
> 
> How about "$<TARGET_NAME:...>"?  If it is ever evaluated (instead
> of replaced) then it evalutes to "..." anyway, right?

Correct. Is does deliberately get evaluated at generate time when computing 
the link implementation (or link interface). It is only preprocessed and 
replaced when property values are being exported.

I've also extended the preprocessing logic now to also include 

 $<TARGET_PROPERTY:tgt,prop>

in cases where tgt is a literal. That saves having to (remember to) write

 $<TARGET_PROPERTY:$<TARGET_NAME:tgt>,prop>

all the time. Using TARGET_NAME is still necessary in cases where tgt is not 
a literal. Eg:

 $<TARGET_PROPERTY:$<$<CONFIG_DEBUG>:$<TARGET_NAME:tgt_debug>>,prop>

Thanks,

Steve.


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to