[cmake-developers] Generator expressions in target properties
Stephen Kelly
steveire at gmail.com
Tue Nov 20 12:18:16 EST 2012
Brad King wrote:
> On 11/20/2012 11:03 AM, Stephen Kelly wrote:
>> I have only tested on linux though so far. I'm still hoping to get this
>> into 2.8.11, and hoping to get it into next 'soon' for real testing.
>
> I won't have time to do a thorough review until after this week (US
> holiday) but here are some quick comments:
Thanks for the review so far.
>
> - I'd like to see the INTERFACE_LINK_LIBRARIES property and policy
> added earlier in the topic if possible so we can test it separately.
> It does not appear to depend on the "$<BUILD_INTERFACE:...>" changes.
> In general I'd like to handle the topic in most-invasive to least-
> invasive order so we can incrementally merge and test in pieces.
> (Where "invasive" refers to effects on existing projects.)
I can look into that, but in general my preference is least-invasive (eg
cleanups) to most-invasive. In particular the first three commits in the
branch I would like to get in first as a standalone topic (eg revert-use-
generator-target) because they are a minimally 'invasive' cleanup. I can
then move the INTERFACE_LINK_LIBRARIES commit to be first in the rest of the
topic.
>
> - The $<EXPNS> expression is too abbreviated. I think
> $<EXPORT_NAMESPACE> is better. People can always do
> set(ns "$<EXPORT_NAMESPACE>") and then use ${ns}.
Ok, I also thought it was too abbreviated.
> - The std::auto_ptr from <memory> is not portable to ancient compilers.
> Use cmsys::auto_ptr as one can see elsewhere in CMake.
Yes, I saw cmsys::auto_ptr, but std::auto_ptr is also used in CMake. (eg,
cmake::ReadListFile), so I guess the ancient compilers that used to not work
with std::auto_ptr are no longer on the dashboard.
I'm all for consistency, but in which direction? There is an argument for
porting away from and removing cmsys::auto_ptr.
>
> - The $<TARGET:tgt> expression will be too easily confused with
> the $<TARGET_FILE:tgt> expression IMO. Perhaps something like
> $<TARGET_EXISTS:tgt> or $<TARGET_DEFINED:tgt> is better.
Yes, I'll go with $<TARGET_DEFINED:tgt>.
> - CMP0020 does not appear to have a WARN implementation.
Oops. :)
I've been looking at this stuff for too long...
Thanks,
Steve.
More information about the cmake-developers
mailing list