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 / FindRngStream.cmake
1 find_path(HAVE_RNGSTREAM_H
2   NAME RngStream.h
3   HINTS
4   $ENV{HOME}
5   PATH_SUFFIXES include
6   PATHS
7   /opt
8   /opt/local
9   /opt/csw
10   /sw
11   /usr
12   )
13
14 find_library(HAVE_RNGSTREAM_LIB
15   NAME rngstreams
16   HINTS
17   $ENV{HOME}
18   PATH_SUFFIXES lib64 lib lib32
19   PATHS
20   /opt
21   /opt/local
22   /opt/csw
23   /sw
24   /usr
25   )
26
27 message(STATUS "Looking for RngStream.h")
28 if(HAVE_RNGSTREAM_H)
29   message(STATUS "Looking for RngStream.h - found")
30   string(REGEX MATCH "-I${HAVE_RNGSTREAM_H} " operation "${CMAKE_C_FLAGS}")
31   if(NOT operation)
32     SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-I${HAVE_RNGSTREAM_H} ")
33   endif()
34 else()
35   message(STATUS "Looking for RngStream.h - not found")
36 endif()
37
38 message(STATUS "Looking for lib rngstreams")
39 if(HAVE_RNGSTREAM_LIB)
40   message(STATUS "Looking for lib rngstreams - found")
41   string(REGEX REPLACE "/librngstreams.*" "" HAVE_RNGSTREAM_LIB "${HAVE_RNGSTREAM_LIB}")
42   string(REGEX MATCH "-L${HAVE_RNGSTREAM_LIB} " operation "${CMAKE_C_FLAGS}")
43   if(NOT operation)
44     SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-L${HAVE_RNGSTREAM_LIB} ")
45   endif()
46 else()
47   message(STATUS "Looking for lib rngstreams - not found")
48 endif()
49
50 mark_as_advanced(HAVE_RNGSTREAM_LIB)
51 mark_as_advanced(HAVE_RNGSTREAM_H)