]> AND Public Git Repository - simgrid.git/blobdiff - buildtools/Cmake/Modules/FindSimGrid.cmake
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove old cruft.
[simgrid.git] / buildtools / Cmake / Modules / FindSimGrid.cmake
index 7b8a83eb41503fef29699a7e04c7df6f8bab6747..69b55deb1608b7505f02bc95f21c41e4cfc5dea7 100644 (file)
@@ -63,24 +63,32 @@ find_program(HAVE_GRAS_STUB
        /usr
 )
 
-message("-- Looking for lib SimGrid")
+message(STATUS "Looking for lib SimGrid")
 if(HAVE_SIMGRID_LIB)
-message("-- Looking for lib SimGrid - found")
+  message(STATUS "Looking for lib SimGrid - found")
+  get_filename_component(simgrid_version ${HAVE_SIMGRID_LIB} REALPATH)
+  string(REPLACE "${HAVE_SIMGRID_LIB}." "" simgrid_version "${simgrid_version}")
+  string(REGEX MATCH "^[0-9]" SIMGRID_MAJOR_VERSION "${simgrid_version}")
+  string(REGEX MATCH "^[0-9].[0-9]" SIMGRID_MINOR_VERSION "${simgrid_version}")
+  string(REGEX MATCH "^[0-9].[0-9].[0-9]" SIMGRID_PATCH_VERSION "${simgrid_version}")
+  string(REGEX REPLACE "^${SIMGRID_MINOR_VERSION}." "" SIMGRID_PATCH_VERSION "${SIMGRID_PATCH_VERSION}") 
+  string(REGEX REPLACE "^${SIMGRID_MAJOR_VERSION}." "" SIMGRID_MINOR_VERSION "${SIMGRID_MINOR_VERSION}")
+  message(STATUS "Simgrid version : ${SIMGRID_MAJOR_VERSION}.${SIMGRID_MINOR_VERSION}")
 else(HAVE_SIMGRID_LIB)
-message("-- Looking for lib SimGrid - not found")
+  message(STATUS "Looking for lib SimGrid - not found")
 endif(HAVE_SIMGRID_LIB)
 
-message("-- Looking for gras.h")
+message(STATUS "Looking for gras.h")
 if(HAVE_GRAS_H)
-message("-- Looking for gras.h - found")
+message(STATUS "Looking for gras.h - found")
 else(HAVE_GRAS_H)
-message("-- Looking for gras.h - not found")
+message(STATUS "Looking for gras.h - not found")
 endif(HAVE_GRAS_H)
 
 if(HAVE_TESH)
-message("-- Found Tesh: ${HAVE_TESH}")
+message(STATUS "Found Tesh: ${HAVE_TESH}")
 endif(HAVE_TESH)
 
 if(HAVE_GRAS_STUB)
-message("-- Found gras_stub_generator: ${HAVE_GRAS_STUB}")
+message(STATUS "Found gras_stub_generator: ${HAVE_GRAS_STUB}")
 endif(HAVE_GRAS_STUB)
\ No newline at end of file