[CMake] C++ and FORTRAN

Maik Beckmann beckmann.maik at googlemail.com
Wed May 28 09:56:17 EDT 2008


Am Mittwoch 28 Mai 2008 15:25:06 schrieb Bill Hoffman:
> Yup, sorry, won't work.  Each target (library, exe) must be all fortran.
>   The IDE does not support mixed CXX and Fortran. So, you would have to
> have:
>
>
>
> CMAKE_MINIMUM_REQUIRED( VERSION 2.6 )
>
> ENABLE_LANGUAGE( Fortran )
>
> ADD_LIBRARY(myfortran STATIC f.f90)
> ADD_EXECUTABLE(
>   cf
>   c.cpp
> )
> target_link_libraries(cf myfortran)
>

This will result in a solution which contains a Visual Fortran Static Library 
project and a Visual C++ Executable project?


Thanks,
 -- Maik


More information about the CMake mailing list