Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Support for F90 also needs f2c.
[simgrid.git] / buildtools / Cmake / CompleteInFiles.cmake
index eaf6c29..16aff5c 100644 (file)
@@ -78,10 +78,6 @@ set(HAVE_GTNETS 0)
 if(enable_gtnets)
   include(FindGTnets)
 endif()
-if(enable_smpi)
-  include(FindF2c)
-  SET(HAVE_SMPI 1)
-endif()
 if(enable_java)
   find_package(Java REQUIRED COMPONENTS Runtime Development)
   find_package(JNI REQUIRED)
@@ -221,6 +217,13 @@ else()
   SET(MMALLOC_WANT_OVERRIDE_LEGACY 0)
 endif()
 
+if(enable_smpi)
+  include(FindF2c)
+  # FindGFortran must come after FindF2C, and after having set HAVE_MC
+  include(FindGFortran)
+  SET(HAVE_SMPI 1)
+endif()
+
 #--------------------------------------------------------------------------------------------------
 ### Check for some architecture dependent values
 CHECK_TYPE_SIZE(int SIZEOF_INT)