FindMUMPS.cmake 1.05 KB
Newer Older
1
2
3
4
5
6
7
# - Try to find MUMPS
# Once done this will define
#  MUMPS_FOUND - System has Mumps
#  MUMPS_INCLUDE_DIRS - The Mumps include directories
#  MUMPS_LIBRARY_DIRS - The library directories needed to use Mumps
#  MUMPS_LIBRARIES    - The libraries needed to use Mumps

David Bommes's avatar
David Bommes committed
8
9
10
11
12
if (MUMPS_INCLUDE_DIR)
  # in cache already
  SET(MUMPS_FIND_QUIETLY TRUE)
endif (MUMPS_INCLUDE_DIR)

13
14
15
16
find_path(MUMPS_INCLUDE_DIR NAMES dmumps_c.h
     PATHS "$ENV{IPOPT_HOME}/ThirdParty/Mumps/MUMPS/include/"
           "/usr/include/"
           
David Bommes's avatar
David Bommes committed
17
   )
18
19
20
21
22
23
24
25
   
find_library( MUMPS_LIBRARY 
              dmumps coinmumps
              PATHS "$ENV{IPOPT_HOME}/lib/"
                    "/usr/lib" )

set(MUMPS_INCLUDE_DIRS "${MUMPS_INCLUDE_DIR}" )
set(MUMPS_LIBRARIES "${MUMPS_LIBRARY}" )
David Bommes's avatar
David Bommes committed
26

27
28
29
30
31
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBCPLEX_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(MUMPS  DEFAULT_MSG
                                  MUMPS_LIBRARY MUMPS_INCLUDE_DIR)
David Bommes's avatar
David Bommes committed
32

33
mark_as_advanced(MUMPS_INCLUDE_DIR MUMPS_LIBRARY )