[cmake-developers] Compatible INTERFACE user properties and string properties

Brad King brad.king at kitware.com
Thu Jan 10 13:52:20 EST 2013


On 01/10/2013 01:04 PM, Stephen Kelly wrote:
> the COMPATIBLE_INTERFACE_BOOL property:
> 
>  set_property(TARGET Qt4::QAxServer APPEND PROPERTY
>       COMPATIBLE_INTERFACE_BOOL QT4_NO_LINK_QTMAIN)

A better name may be "INTERFACE_COMPATIBLE_BOOL" since the compatibility
requirement is actually part of the interface.

Actually, since you made generator expressions use lazy evaluation, can't
we introduce a $<FATAL_ERROR:msg> expression that could be used inside some
condition checker to report failure?

> implement support in CMake for. For example, setting the CXX_STDLIB property 
> on a target to libc++ would pass -stdlib=libc++ if using clang. What it does 
> for other compilers is up for debate. Linking a target to a library with 
> INTERFACE_CXX_STDLIB=libc++ would set the CXX_STDLIB property on the target 
> libc++ too etc, and un-equal strings in that property would be a generate-
> time error.
[snip]
> Similar to my first point above, this string equality requirement could also 
> be extended to users with a COMPATIBLE_INTERFACE_STRING property.

Yes, this sounds promising for solving problems like that.

Thanks,
-Brad



More information about the cmake-developers mailing list