File: FindMPFR.cmake

package info (click to toggle)
gecode-snapshot 6.2.0%2Bgit20240207-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 35,308 kB
  • sloc: cpp: 475,516; perl: 2,077; makefile: 1,816; sh: 198
file content (25 lines) | stat: -rw-r--r-- 844 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
### Try to find MPFR
# Once done this will define
#  MPFR_FOUND         - System has MPFR
#  MPFR_INCLUDE_DIRS  - The MPFR include directories
#  MPFR_LIBRARIES     - The libraries needed to use MPFR

find_path(MPFR_INCLUDE NAMES mpfr.h
          PATHS $ENV{GMPDIR} $ENV{MPFRDIR} ${INCLUDE_INSTALL_DIR})

find_library(MPFR_LIBRARY mpfr
             PATHS $ENV{GMPDIR} $ENV{MPFRDIR} ${LIB_INSTALL_DIR})

include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set MPFR_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(MPFR
  FOUND_VAR MPFR_FOUND
  REQUIRED_VARS MPFR_LIBRARY MPFR_INCLUDE
  FAIL_MESSAGE "Could NOT find MPFR, use MPFR_ROOT to hint its location"
)

mark_as_advanced(MPFR_INCLUDE MPFR_LIBRARY)

set(MPFR_INCLUDES ${MPFR_INCLUDE})
set(MPFR_LIBRARIES ${MPFR_LIBRARY})