X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4713af90ef9c023d84da321abc1f387d195b8d48..37a44313f5760bc8cb95573360805cc42730e770:/tools/cmake/MakeLib.cmake diff --git a/tools/cmake/MakeLib.cmake b/tools/cmake/MakeLib.cmake index 57292dd749..c6aba0d7b0 100644 --- a/tools/cmake/MakeLib.cmake +++ b/tools/cmake/MakeLib.cmake @@ -94,6 +94,17 @@ 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") + endif() + endif() + endif() if(enable_smpi AND APPLE)