[CMake] C++ and FORTRAN

Arjen Markus arjen.markus at wldelft.nl
Wed May 28 09:28:40 EDT 2008


Allen Barnett wrote:

>Hi: I have a project which consists of a C++ main and a set of FORTRAN
>computational routines which I'm trying to build on windows XP. I'm
>using visual studio 2008 (VC9) and the Intel FORTRAN compiler (10.1) on
>IA32. I'm also using CMake 2.6 patch 0.
>If I generate NMake Makefiles, everything works correctly; both the C++
>main and the FORTRAN subroutines are correctly compiled and linked.
>However, if I generate a visual studio 2008 project and try to build it
>within the GUI, the FORTRAN object is not compiled. (I have to admit
>nearly complete ignorance about how visual studio works so this is very
>likely a case of operator error; but it looks like no compilation
>directives are created for the FORTRAN source file.)
>I attached some files which emulate my project. Any guidance would be
>greatly appreciated.
>  
>
Hi Allen,

perhaps the dependencies are not set correctly? Visual Studio (at least 
recent
versions) does not allow mixed-language projects, so everything is put in a
separate project. To get an executable, however, all projects must be built.

I have no experience with the "solution" files that CMake produces, but this
is a likely cause.

Regards,

Arjen


More information about the CMake mailing list