Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
valgrind version checking rule did not match 3.10.0
[simgrid.git] / tools / cmake / Modules / FindSimGrid.cmake
1 #IF YOU HAVE INSTALL SIMGRID IN A SPECIAL DIRECTORY
2 #YOU CAN SPECIFY SIMGRID_ROOT
3
4 # TO CALL THIS FILE USE
5 #set(CMAKE_MODULE_PATH
6 #${CMAKE_MODULE_PATH}
7 #${CMAKE_HOME_DIRECTORY}/tools/cmake/Modules
8 #)
9
10 find_library(HAVE_SIMGRID_LIB
11   NAME simgrid
12   HINTS
13   $ENV{LD_LIBRARY_PATH}
14   $ENV{SIMGRID_ROOT}
15   PATH_SUFFIXES lib64 lib
16   PATHS
17   /opt
18   /opt/local
19   /opt/csw
20   /sw
21   /usr
22   )
23
24 find_program(HAVE_TESH
25   NAMES tesh
26   HINTS
27   $ENV{SIMGRID_ROOT}
28   PATH_SUFFIXES bin
29   PATHS
30   /opt
31   /opt/local
32   /opt/csw
33   /sw
34   /usr
35   )
36
37 message(STATUS "Looking for lib SimGrid")
38 if(HAVE_SIMGRID_LIB)
39   message(STATUS "Looking for lib SimGrid - found")
40   get_filename_component(simgrid_version ${HAVE_SIMGRID_LIB} REALPATH)
41   string(REPLACE "${HAVE_SIMGRID_LIB}." "" simgrid_version "${simgrid_version}")
42   string(REGEX MATCH "^[0-9]" SIMGRID_MAJOR_VERSION "${simgrid_version}")
43   string(REGEX MATCH "^[0-9].[0-9]" SIMGRID_MINOR_VERSION "${simgrid_version}")
44   string(REGEX MATCH "^[0-9].[0-9].[0-9]" SIMGRID_PATCH_VERSION "${simgrid_version}")
45   string(REGEX REPLACE "^${SIMGRID_MINOR_VERSION}." "" SIMGRID_PATCH_VERSION "${SIMGRID_PATCH_VERSION}")
46   string(REGEX REPLACE "^${SIMGRID_MAJOR_VERSION}." "" SIMGRID_MINOR_VERSION "${SIMGRID_MINOR_VERSION}")
47   message(STATUS "Simgrid version : ${SIMGRID_MAJOR_VERSION}.${SIMGRID_MINOR_VERSION}")
48 else()
49   message(STATUS "Looking for lib SimGrid - not found")
50 endif()
51
52 if(HAVE_TESH)
53   message(STATUS "Found Tesh: ${HAVE_TESH}")
54 endif()