FindGMP

Find the GNU Multiple Precision Arithmetic Library (GMP) and its C++ bindings GMPxx.

This module searches for both libraries and only considers the package found if both can be located. It then defines separate targets for the C and the C++ library.

Imported Targets

This module provides the following imported targets, if found:

GMP::gmp

Imported target for the GMP C library.

GMP::gmpxx

Imported target for the GMP C++ library. It also links to GMP::gmp.

Result Variables

This module defines the following variables:

GMP_FOUND

Boolean result indicating whether the GMP headers and library as well as the GMPxx headers and library were found and passed the compile test.

Hints

The following cache variables may be set to influence this module’s behavior:

GMP_INCLUDE_DIR

The directory containing gmp.h.

GMP_LIB

Full path to the GMP library.

GMPXX_INCLUDE_DIR

The directory containing gmpxx.h.

GMPXX_LIB

Full path to the GMPxx library.