[cmake-developers] CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS and CMP0065

Stephen Kelly steveire at gmail.com
Thu Oct 6 13:45:42 EDT 2016


Hi,

I have encountered the implementation of CMP0065. As far as I can see, this 
is the only use of CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS, and it is not 
used for shared libraries, but for executables.

Finding uses of variables like that is hard because they could be composed 
like

 "CMAKE_"
 + targetType 
 + "_LINK_"
 + lang
 + "_FLAGS";

which is hard to find with grep.

Am I missing something or is that also used for shared libraries? Or should 
the variable be renamed? Or should CMP0065 be using some other appropriate 
variable?

Also, shouldn't that code be part of cmComputeLinkInformation? It seems out 
of place in cmLocalGenerator. If it were returned from cli.GetItems, then 
cmLocalVisualStudio7GeneratorInternals::OutputLibraries and 
cmGlobalXCodeGenerator::AddDependAndLinkInformation would make use of it, 
which as far as I can tell they currently do not. Should/do those generators 
support ENABLE_EXPORTS?

Thanks,

Steve.




More information about the cmake-developers mailing list