File: FindMPFR.cmake

package info (click to toggle)
openturns 1.26-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 67,708 kB
  • sloc: cpp: 261,605; python: 67,030; ansic: 4,378; javascript: 406; sh: 185; xml: 164; makefile: 101
file content (51 lines) | stat: -rw-r--r-- 1,548 bytes parent folder | download
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# - Find MPFR
# MPFR includes software for computing with arbitrary precision floating points
# https://www.mpfr.org/
#
# The module defines the following variables:
#  MPFR_INCLUDE_DIRS, where to find mpfr.h, etc.
#  MPFR_LIBRARIES, the libraries needed to use MPFR.
#  MPFR_FOUND, If false, do not try to use MPFR.
# also defined, but not for general use are
#  MPFR_LIBRARY, where to find the MPFR library.
#
#=============================================================================
# Copyright 2005-2025 Airbus-EDF-IMACS-ONERA-Phimeca
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distributed this file outside of CMake, substitute the full
#  License text for the above reference.)

find_path (MPFR_INCLUDE_DIR mpfr.h
  PATH_SUFFIXES mpfr
)

find_library (MPFR_LIBRARY
  NAMES mpfr
)

set (MPFR_LIBRARIES ${MPFR_LIBRARY})

find_library(GMP_LIBRARY NAMES gmp)

if (GMP_LIBRARY)
  list (APPEND MPFR_LIBRARIES ${GMP_LIBRARY})
endif ()

set (MPFR_INCLUDE_DIRS ${MPFR_INCLUDE_DIR})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MPFR DEFAULT_MSG MPFR_LIBRARY MPFR_INCLUDE_DIRS)

mark_as_advanced (
  MPFR_LIBRARY
  MPFR_LIBRARIES
  MPFR_INCLUDE_DIR
  MPFR_INCLUDE_DIRS)