Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kinda working again: only a segfault at termination
[simgrid.git] / FindSimGrid.cmake
1 #IF YOU HAVE INSTALL SIMGRID LIBRARIES AND SIMGRID BINARIES IN A SPECIAL DIRECTORY
2 #YOU CAN SPECIFY SIMGRID_LIBRARY_PAT AND SIMGRID_BIN_PATH OR SIMPLY LD_LIBRARY_PATH
3
4 # TO CALL THIS FILE USE
5         #set(CMAKE_MODULE_PATH 
6         #${CMAKE_MODULE_PATH}
7         #${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Modules
8         #)
9
10 message("SIMGRID_LIBRARY_PATH   = $ENV{SIMGRID_LIBRARY_PATH}")
11 message("SIMGRID_BIN_PATH       = $ENV{SIMGRID_BIN_PATH}")
12 message("LD_LIBRARY_PATH        = $ENV{LD_LIBRARY_PATH}")
13
14 find_library(HAVE_SIMGRID_LIB
15     NAME simgrid
16     HINTS
17     $ENV{LIBRARIES}
18     $ENV{LD_LIBRARY_PATH}
19     $ENV{SIMGRID_LIBRARY_PATH}
20     PATH_SUFFIXES lib64 lib simgrid/lib64 simgrid/lib
21     PATHS
22     /opt
23     /opt/local
24     /opt/csw
25     /sw
26     /usr
27 )
28
29 find_path(HAVE_GRAS_H gras.h
30     HINTS
31     $ENV{INCLUDES}
32     $ENV{LD_LIBRARY_PATH}
33     $ENV{SIMGRID_LIBRARY_PATH}
34     PATH_SUFFIXES include simgrid/include
35     PATHS
36     /opt
37     /opt/local
38     /opt/csw
39     /sw
40     /usr
41 )
42
43 string(REPLACE "/include" "/bin" OPTIONAL_BIN_PATH "HAVE_GRAS_H")
44
45 find_program(HAVE_TESH
46 NAMES tesh
47 HINTS
48 $ENV{SIMGRID_BIN_PATH}
49 $ENV{LD_LIBRARY_PATH}
50 PATH_SUFFIXES bin simgrid/bin
51 PATHS
52 ${OPTIONAL_BIN_PATH}
53 /opt
54 /opt/local
55 /opt/csw
56 /sw
57 /usr
58 )
59
60 find_program(HAVE_GRAS_STUB
61 NAMES gras_stub_generator
62 HINTS
63 $ENV{SIMGRID_BIN_PATH}
64 $ENV{LD_LIBRARY_PATH}
65 PATH_SUFFIXES bin simgrid/bin
66 PATHS
67 /opt
68 /opt/local
69 /opt/csw
70 /sw
71 /usr
72 )
73
74 message("HAVE_SIMGRID_LIB       = ${HAVE_SIMGRID_LIB}")
75 message("HAVE_GRAS_H            = ${HAVE_GRAS_H}")
76 message("HAVE_TESH              = ${HAVE_TESH}")
77 message("HAVE_GRAS_STUB                 = ${HAVE_GRAS_STUB}")