aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake/FindMPFR.cmake
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2010-07-15 16:29:04 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2010-07-15 16:29:04 +0200
commit87e89fea4e05f2f516bf6efb3986a8ee9aee6de6 (patch)
treef3299c01e8f1d84533b0b8957727eddbb9e053ef /cmake/FindMPFR.cmake
parentbfbe61454e5412382e932fa9de26ef6bce14cce4 (diff)
add a support module for MPFR C++ with basic unit testing
Diffstat (limited to 'cmake/FindMPFR.cmake')
-rw-r--r--cmake/FindMPFR.cmake21
1 files changed, 21 insertions, 0 deletions
diff --git a/cmake/FindMPFR.cmake b/cmake/FindMPFR.cmake
new file mode 100644
index 000000000..3aa97f0b4
--- /dev/null
+++ b/cmake/FindMPFR.cmake
@@ -0,0 +1,21 @@
+# Try to find the MPFR library
+# See http://www.mpfr.org/
+
+if (MPFR_INCLUDES AND MPFR_LIBRARIES)
+ set(MPFR_FIND_QUIETLY TRUE)
+endif (MPFR_INCLUDES AND MPFR_LIBRARIES)
+
+find_path(MPFR_INCLUDES
+ NAMES
+ mpfr.h
+ PATHS
+ $ENV{GMPDIR}
+ ${INCLUDE_INSTALL_DIR}
+)
+
+find_library(MPFR_LIBRARIES mpfr PATHS $ENV{GMPDIR} ${LIB_INSTALL_DIR})
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(MPFR DEFAULT_MSG
+ MPFR_INCLUDES MPFR_LIBRARIES)
+mark_as_advanced(MPFR_INCLUDES MPFR_LIBRARIES)