X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/983ca84f3ac2d74ba56145026d89bd11f3f096e5..2075838c45a56f2710e5e62ef3ceb7c67add6a31:/tools/cmake/Modules/FindGFortran.cmake diff --git a/tools/cmake/Modules/FindGFortran.cmake b/tools/cmake/Modules/FindGFortran.cmake index 1369d64bd1..67741a301a 100644 --- a/tools/cmake/Modules/FindGFortran.cmake +++ b/tools/cmake/Modules/FindGFortran.cmake @@ -1,13 +1,17 @@ -find_program(GFORTRAN_EXE - NAME gfortran - PATH_SUFFIXES bin/ - PATHS - /opt - /opt/local - /opt/csw - /sw - /usr +if(DEFINED ENV{FC}) + set (GFORTRAN_EXE $ENV{FC}) +else() + find_program(GFORTRAN_EXE + NAME gfortran + PATH_SUFFIXES bin/ + PATHS + /opt + /opt/local + /opt/csw + /sw + /usr ) +endif() mark_as_advanced(GFORTRAN_EXE)