[CMake] Correct way to link with libstdc++ from non-C++ project?

Michael Wild themiwi at gmail.com
Fri Sep 16 00:24:26 EDT 2011


On Thu 15 Sep 2011 11:04:58 PM CEST, Jed Brown wrote:
> On Thu, Sep 15, 2011 at 18:57, Michael Wild <themiwi at gmail.com
> <mailto:themiwi at gmail.com>> wrote:
>
>     Just set the LINKER_LANGUAGE target property to CXX.
>
>
> This seems to be exclusive (single-valued). How can I specify that,
> for example, a target containing only C sources needs to be linked as
> though it also had both C++ and Fortran sources (because of leaky
> dependent libraries)? (I will assume that I have found functional
> compilers for all three languages.)

In that case AFAIK the variables CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES 
(where <LANG> is C, CXX and Fortran) could help.

Michael


More information about the CMake mailing list