Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
7ccb9cdb8d2a336e53c6624ed651a549edfac5ca
[simgrid.git] / buildtools / Cmake / Modules / FindF2c.cmake
1 find_path(HAVE_F2C_H f2c.h
2   HINTS
3   $ENV{LD_LIBRARY_PATH}
4   PATH_SUFFIXES include/
5   PATHS
6   /opt
7   /opt/local
8   /opt/csw
9   /sw
10   /usr
11   )
12
13 find_program(F2C_EXE
14   NAME f2c
15   PATH_SUFFIXES bin/
16   PATHS
17   /opt
18   /opt/local
19   /opt/csw
20   /sw
21   /usr
22   )
23
24 find_library(HAVE_F2C_LIB
25   NAME f2c
26   HINTS
27   $ENV{LD_LIBRARY_PATH}
28   PATH_SUFFIXES lib/
29   PATHS
30   /opt
31   /opt/local
32   /opt/csw
33   /sw
34   /usr
35   )
36
37 if(HAVE_F2C_H)
38   set(HAVE_SMPI_F2C_H 1)
39 endif(HAVE_F2C_H)
40
41 message(STATUS "Looking for f2c.h")
42 if(HAVE_F2C_H)
43   message(STATUS "Looking for f2c.h - found")
44 else(HAVE_F2C_H)
45   message(STATUS "Looking for f2c.h - not found")
46 endif(HAVE_F2C_H)
47
48 message(STATUS "Looking for lib f2c")
49 if(HAVE_F2C_LIB)
50   message(STATUS "Looking for lib f2c - found")
51 else(HAVE_F2C_LIB)
52   message(STATUS "Looking for lib f2c - not found")
53 endif(HAVE_F2C_LIB)
54
55 if(F2C_EXE)
56   message(STATUS "Found F2C: ${F2C_EXE}")
57 endif(F2C_EXE)
58
59 mark_as_advanced(HAVE_F2C_H)
60 mark_as_advanced(F2C_EXE)
61 mark_as_advanced(HAVE_F2C_LIB)
62
63 if(HAVE_F2C_H)
64   include_directories(${HAVE_F2C_H})
65 else(HAVE_F2C_H)
66   message(FATAL_ERROR "You should install f2c before use smpi.")
67 endif(HAVE_F2C_H)