X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c9a890840c51bcdb476debf2e5b30da71c486ec4..9fd6cbc6c3b06f4b09e3c3339ffb3cc8a68f9bfa:/tools/cmake/MakeLib.cmake diff --git a/tools/cmake/MakeLib.cmake b/tools/cmake/MakeLib.cmake index 57292dd749..24b8b0775f 100644 --- a/tools/cmake/MakeLib.cmake +++ b/tools/cmake/MakeLib.cmake @@ -94,6 +94,20 @@ if(enable_smpi) PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/simgrid) install(TARGETS smpimain # install that binary without breaking the rpath on Mac RUNTIME DESTINATION lib/simgrid) + + if(SMPI_FORTRAN) + if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU") + SET(SIMGRID_DEP "${SIMGRID_DEP} -lgfortran") + elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Intel") + SET(SIMGRID_DEP "${SIMGRID_DEP} -lifcore") + elseif(CMAKE_Fortran_COMPILER_ID MATCHES "PGI|Flang") + SET(SIMGRID_DEP "${SIMGRID_DEP} -lflang") + if("${CMAKE_SYSTEM}" MATCHES "FreeBSD") + set(SIMGRID_DEP "${SIMGRID_DEP} -lexecinfo") + endif() + endif() + endif() + endif() if(enable_smpi AND APPLE)