[cmake-developers] New policy to address rdynamic

Stephen Kelly steveire at gmail.com
Wed Aug 26 13:58:51 EDT 2015


Chuck Atkins wrote:

> I've implemented a new policy, CMP0065, to restrict the addition of
> CMAKE_SHARED_LIBRARY_LINK_<LANG>_FLAGS to executables to only when the
> ENABLE_EXPORTS target property is set.  This should allow us to preserve
> backwards compatibility in the places it breaks existing binaries but
> allow us to remove it by default for newer projects.
> 
> See stage/restrict-shlib-link-flags-to-enable-exports
> 
> The motivator behind this is to get closer to easily supporting fully
> static binaries..  Any feedback would be appreciated.

You add an

 [ENABLE_EXPORTS] 

keyword to try_compile. Maybe 

 [TARGET_PROPERTIES <prop1> <value1> [<prop1> <value1>]... ]

makes sense instead? 

That would allow setting ANDROID_API, WIN32_EXECUTABLE etc.

Thanks,

Steve.



More information about the cmake-developers mailing list