[CMake] Fortran program linked with C++ library
Brad King
brad.king at kitware.com
Tue Sep 3 14:08:14 EDT 2013
On 09/03/2013 01:57 PM, Marcin Wojdyr wrote:
> On 3 September 2013 15:46, Brad King <brad.king at kitware.com> wrote:
>> One way to do this is to tell CMake that the library uses C++
>> using the IMPORTED_LINK_INTERFACE_LANGUAGES property on an
>
> That's what I was looking for, but for me instead of adding C++
> runtime, C++ compiler (icpc) is used for linking.
> So I have the same problem:
> undefined reference to `main'
Now set LINKER_LANGUAGE to "Fortran" to tell it that your main
is there. I think the LINKER_PREFERENCE infrastructure may be
outdated.
-Brad
More information about the CMake
mailing list