Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Support for F90 also needs f2c.
[simgrid.git] / buildtools / Cmake / CompleteInFiles.cmake
index 846f9ea..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)
@@ -511,12 +514,20 @@ if(EXISTS ${CMAKE_HOME_DIRECTORY}/.git/ AND NOT WIN32)
     string(REPLACE "\n" "" GIT_DATE "${GIT_DATE}")
     message(STATUS "Git date: ${GIT_DATE}")
     string(REGEX REPLACE " .*" "" GIT_VERSION "${GIT_VERSION}")
-    STRING(REPLACE " +0000" "" GIT_DATE "${GIT_DATE}")
-    STRING(REPLACE " " "~" GIT_DATE "${GIT_DATE}")
-    STRING(REPLACE ":" "-" GIT_DATE "${GIT_DATE}")
   endif()
 endif()
 
+if(release)
+  set(SIMGRID_VERSION_STRING "${SIMGRID_VERSION_STRING}\\nRelease build")
+else()
+  set(SIMGRID_VERSION_STRING "${SIMGRID_VERSION_STRING}\\nDevelopment build")
+endif()
+if(GIT_VERSION)
+  set(SIMGRID_VERSION_STRING "${SIMGRID_VERSION_STRING} at commit ${GIT_VERSION}")
+endif()
+if(GIT_DATE)
+  set(SIMGRID_VERSION_STRING "${SIMGRID_VERSION_STRING} (${GIT_DATE})")
+endif()
 #--------------------------------------------------------------------------------------------------
 
 set(makecontext_CPPFLAGS_2 "")