[cmake-developers] CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS and CMP0065
Brad King
brad.king at kitware.com
Thu Oct 6 16:01:24 EDT 2016
On 10/06/2016 03:46 PM, Stephen Kelly wrote:
> Do you know what CMAKE_EXE_EXPORTS_${lang}_FLAG is? It is added to the
> linkFlags already for executables with exports.
Ah, that does appear to be the same thing.
> Is CMP0065 adding redundant flags?
The policy only affects executables without exports, so it makes no
difference for anything that is getting CMAKE_EXE_EXPORTS_${lang}_FLAG.
However, the code path where the policy appears was already adding
redundant flags.
I think CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS values in platform
files can be copied over to CMAKE_EXE_EXPORTS_${lang}_FLAG where they
are not set already. Then the policy's NEW behavior can be changed
to doing nothing because executables with exports will already have
the flags needed. The only reason to keep the old settings of
CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS around is then to honor the
CMP0065 OLD behavior.
-Brad
More information about the cmake-developers
mailing list