Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics
[simgrid.git] / tools / cmake / Modules / FindGFortran.cmake
index 1369d64..67741a3 100644 (file)
@@ -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)