[cmake-developers] EXPORT_NAME-genex
Brad King
brad.king at kitware.com
Wed May 22 14:56:53 EDT 2013
On 05/20/2013 10:15 AM, Stephen Kelly wrote:
> Brad King wrote:
>> Other than for error message generation, what does knowing whether a
>> target is imported or not matter? Abstracting that away has value too.
>> See below.
>
> Some other things I can think of is that an imported target can't be re-
> exported, and its location property can be safely read (btw, I don't know if
> $<TARGET_FILE:tgt> reads the LOCATION for IMPORTED targets).
>
> The difference can't be fully abstracted away. There are other differences
> in how they can be used.
These are reasons a project CMake code author might want to treat
the targets differently, but they don't need :: to know which targets
are not theirs. If I'm in a project Foo and see a target name
called "boost_any" I can be pretty sure it isn't mine.
I'm fine with the :: convention for those who want it but it should
not be the only recommended way.
> IMPORTED targets can't be used as the RHS in tll, for example.
Huh? That is *the* use case for them.
-Brad
More information about the cmake-developers
mailing list