Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
factor parce_factor
[simgrid.git] / tools / cmake / Modules / FindGFortran.cmake
1 if(DEFINED ENV{FC})
2   set (GFORTRAN_EXE $ENV{FC})
3 else()
4   find_program(GFORTRAN_EXE
5     NAME gfortran
6     PATH_SUFFIXES bin/
7     PATHS
8     /opt
9     /opt/local
10     /opt/csw
11     /sw
12     /usr
13   )
14 endif()
15
16 mark_as_advanced(GFORTRAN_EXE)
17
18 message(STATUS "Looking for bin gfortran")
19 set(SMPI_FORTRAN 0)
20 if(NOT WIN32 AND NOT APPLE)
21   if(GFORTRAN_EXE)
22     message(STATUS "Found gfortran: ${GFORTRAN_EXE}")
23     set(SMPI_FORTRAN 1)
24   else()
25     message(STATUS "Looking for bin gfortran - not found")
26   endif()
27 else()
28   message(STATUS "SMPI Fortran is disabled on Windows and MacOS platforms. Please contact the SimGrid team if you need it.")
29 endif()
30
31 if(NOT SMPI_FORTRAN)
32   message("-- Fortran support for smpi is disabled.")
33 endif()