diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2014-12-05 13:32:54 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2014-12-05 13:32:54 +0000 |
commit | 425b462d361286822ee0ed7b5fe00881ba312ea3 (patch) | |
tree | e8f641a8604418882b916573cf32c87b78d33472 /src/cmake/modules/FindGMPXX.cmake | |
parent | 952b77f3b1e2415602d5d9ffc2fb7ff45cc3edc4 (diff) |
Moved into trunk
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@341 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Diffstat (limited to 'src/cmake/modules/FindGMPXX.cmake')
-rw-r--r-- | src/cmake/modules/FindGMPXX.cmake | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/cmake/modules/FindGMPXX.cmake b/src/cmake/modules/FindGMPXX.cmake new file mode 100644 index 00000000..277e4b19 --- /dev/null +++ b/src/cmake/modules/FindGMPXX.cmake @@ -0,0 +1,44 @@ +# - Try to find the GMPXX libraries +# This module defines: +# GMPXX_FOUND - system has GMPXX lib +# GMPXX_INCLUDE_DIR - the GMPXX include directory +# GMPXX_LIBRARIES - Libraries needed to use GMPXX + +# TODO: support Windows and MacOSX + +# GMPXX needs GMP + +find_package( GMP QUIET ) + +if(GMP_FOUND) + + if (GMPXX_INCLUDE_DIR AND GMPXX_LIBRARIES) + # Already in cache, be silent + set(GMPXX_FIND_QUIETLY TRUE) + endif() + + find_path(GMPXX_INCLUDE_DIR NAMES gmpxx.h + HINTS ENV GMPXX_INC_DIR + ENV GMPXX_DIR + ${GMP_INCLUDE_DIR_SEARCH} + PATH_SUFFIXES include + DOC "The directory containing the GMPXX include files" + ) + + find_library(GMPXX_LIBRARIES NAMES gmpxx + HINTS ENV GMPXX_LIB_DIR + ENV GMPXX_DIR + ${GMP_LIBRARIES_DIR_SEARCH} + PATH_SUFFIXES lib + DOC "Path to the GMPXX library" + ) + + include(FindPackageHandleStandardArgs) + + find_package_handle_standard_args(GMPXX "DEFAULT_MSG" GMPXX_LIBRARIES GMPXX_INCLUDE_DIR ) + +else() + + message( FATAL_ERROR "GMPXX needs GMP") + +endif() |