[cmake-developers] Implicit library trouble with mixed languages
Brad King
brad.king at kitware.com
Tue May 2 12:52:59 EDT 2017
On 05/02/2017 11:48 AM, Christian Pfeiffer wrote:
> turn depends on libgcc_s. Any library starting with 'gcc' is being
> ignored in CMakeParseImplicitLinkInfo.cmake L.136, so libgcc_s is being
> stripped from the commandline. PGI Fortran however does not need
> libgcc_s on its own and therefore won't link it.
You might be able to just remove `|gcc.*` from the regex.
The comment nearby says it is trying to remove libraries that
are expected to be common to all language toolchains, but that
is not the case for GCC's libraries when mixing vendors. It
may not be necessary to remove `gcc_s` even when all the tools
are GNU-based (e.g. gcc/g++/gfortran) because we only explicitly
link to implicit libraries for other languages that are not also
implicit to the link language.
-Brad
More information about the cmake-developers
mailing list