← Back to team overview

yade-users team mailing list archive

Re: [Question #654032]: Linking a fortran module with Yade (CMakeLists.txt)

 

Question #654032 on Yade changed:
https://answers.launchpad.net/yade/+question/654032

Deepak posted a new comment:
P.S : for a simple case involving 1 .cpp and 1 .f90 source, I had used a
CMakeLists.txt like this:

project(Appli C CXX Fortran)
cmake_minimum_required(VERSION 2.8.11)
set(CMAKE_Fortran_COMPILER "mpif90")
set(CMAKE_CXX_COMPILER "mpicxx")
find_package(MPI)
add_executable(appli cfort.cpp fortmodule.f90)
target_link_libraries(appli)

and compiling manually by hand I do it this way :

mpicxx -c cfort.cpp 
mpif90 -c fortmodule.f90
mpicxx -o appli cfort.o fortmodule.o -lgfortran -lmpi_mpifh -lmpi_cxx 


thanks.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.