Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Look for gfortran before enabling support for smpif90.
[simgrid.git] / buildtools / Cmake / CompleteInFiles.cmake
index eaf6c29..21f068f 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()
 
+# must come after having set HAVE_MC (FindGFortran uses it)
+if(enable_smpi)
+  include(FindF2c)
+  include(FindGFortran)
+  SET(HAVE_SMPI 1)
+endif()
+
 #--------------------------------------------------------------------------------------------------
 ### Check for some architecture dependent values
 CHECK_TYPE_SIZE(int SIZEOF_INT)