mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix MPReal detection and support.
The latest version of `mpreal` has a bug that breaks `min`/`max`. It also breaks with the latest dev version of `mpfr`. Here we add `FindMPREAL.cmake` which searches for the library and tests if compilation works. Removed our internal copy of `mpreal.h` under `unsupported/test`, as it is out-of-sync with the latest, and similarly breaks with the latest `mpfr`. It would be best to use the installed version of `mpreal` anyways, since that's what we actually want to test. Fixes #2282.
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
1cdec38653
commit
31f796ebef
@@ -55,13 +55,11 @@ ei_add_test(FFT)
|
||||
|
||||
ei_add_test(EulerAngles)
|
||||
|
||||
find_package(MPFR 2.3.0)
|
||||
find_package(GMP)
|
||||
if(MPFR_FOUND AND EIGEN_COMPILER_SUPPORT_CPP11)
|
||||
include_directories(${MPFR_INCLUDES} ./mpreal)
|
||||
find_package(MPREAL)
|
||||
if(MPREAL_FOUND AND EIGEN_COMPILER_SUPPORT_CPP11)
|
||||
ei_add_property(EIGEN_TESTED_BACKENDS "MPFR C++, ")
|
||||
set(EIGEN_MPFR_TEST_LIBRARIES ${MPFR_LIBRARIES} ${GMP_LIBRARIES})
|
||||
ei_add_test(mpreal_support "-std=c++11" "${EIGEN_MPFR_TEST_LIBRARIES}" )
|
||||
include_directories(${MPREAL_INCLUDES})
|
||||
ei_add_test(mpreal_support "-std=c++11" "${MPREAL_LIBRARIES}" )
|
||||
else()
|
||||
ei_add_property(EIGEN_MISSING_BACKENDS "MPFR C++, ")
|
||||
endif()
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,4 @@
|
||||
#include <mpreal.h> // Must be included before main.h.
|
||||
#include "main.h"
|
||||
#include <Eigen/MPRealSupport>
|
||||
#include <Eigen/LU>
|
||||
|
||||
Reference in New Issue
Block a user