2010-10-13 02:23:52 +08:00
|
|
|
|
2011-03-29 21:17:49 +08:00
|
|
|
include_directories(../../test ../../unsupported ../../Eigen
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/../../test)
|
2009-02-28 00:19:13 +08:00
|
|
|
|
2010-06-18 17:28:30 +08:00
|
|
|
set(SPARSE_LIBS "")
|
|
|
|
|
2011-02-23 16:25:32 +08:00
|
|
|
# configure blas/lapack
|
|
|
|
if(CMAKE_Fortran_COMPILER_WORKS)
|
|
|
|
set(BLAS_FOUND TRUE)
|
|
|
|
set(LAPACK_FOUND TRUE)
|
|
|
|
set(BLAS_LIBRARIES eigen_blas_static)
|
|
|
|
set(LAPACK_LIBRARIES eigen_lapack_static)
|
|
|
|
else()
|
|
|
|
# TODO search for default blas/lapack
|
|
|
|
endif()
|
|
|
|
|
2010-06-18 17:28:30 +08:00
|
|
|
find_package(Cholmod)
|
2011-02-23 16:25:32 +08:00
|
|
|
if(CHOLMOD_FOUND AND BLAS_FOUND AND LAPACK_FOUND)
|
2010-06-18 17:28:30 +08:00
|
|
|
add_definitions("-DEIGEN_CHOLMOD_SUPPORT")
|
|
|
|
include_directories(${CHOLMOD_INCLUDES})
|
2011-02-23 16:25:32 +08:00
|
|
|
set(SPARSE_LIBS ${SPARSE_LIBS} ${CHOLMOD_LIBRARIES} ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES})
|
2010-06-18 17:28:30 +08:00
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "Cholmod, ")
|
2011-02-23 16:25:32 +08:00
|
|
|
else()
|
2010-06-18 17:28:30 +08:00
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "Cholmod, ")
|
2011-02-23 16:25:32 +08:00
|
|
|
endif()
|
2010-06-18 17:28:30 +08:00
|
|
|
|
|
|
|
find_package(Umfpack)
|
2011-02-23 16:25:32 +08:00
|
|
|
if(UMFPACK_FOUND AND BLAS_FOUND)
|
2010-06-18 17:28:30 +08:00
|
|
|
add_definitions("-DEIGEN_UMFPACK_SUPPORT")
|
|
|
|
include_directories(${UMFPACK_INCLUDES})
|
2011-02-23 16:25:32 +08:00
|
|
|
set(SPARSE_LIBS ${SPARSE_LIBS} ${UMFPACK_LIBRARIES} ${BLAS_LIBRARIES})
|
2010-06-18 17:28:30 +08:00
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "UmfPack, ")
|
2011-02-23 16:25:32 +08:00
|
|
|
else()
|
2010-06-18 17:28:30 +08:00
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "UmfPack, ")
|
2011-02-23 16:25:32 +08:00
|
|
|
endif()
|
2010-06-18 17:28:30 +08:00
|
|
|
|
|
|
|
find_package(SuperLU)
|
2011-02-23 16:25:32 +08:00
|
|
|
if(SUPERLU_FOUND AND BLAS_FOUND)
|
2010-06-18 17:28:30 +08:00
|
|
|
add_definitions("-DEIGEN_SUPERLU_SUPPORT")
|
|
|
|
include_directories(${SUPERLU_INCLUDES})
|
2011-02-23 16:25:32 +08:00
|
|
|
set(SPARSE_LIBS ${SPARSE_LIBS} ${SUPERLU_LIBRARIES} ${BLAS_LIBRARIES})
|
2010-06-18 17:28:30 +08:00
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "SuperLU, ")
|
2011-02-23 16:25:32 +08:00
|
|
|
else()
|
2010-06-18 17:28:30 +08:00
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "SuperLU, ")
|
2011-02-23 16:25:32 +08:00
|
|
|
endif()
|
2010-06-18 17:28:30 +08:00
|
|
|
|
|
|
|
find_package(GoogleHash)
|
|
|
|
if(GOOGLEHASH_FOUND)
|
|
|
|
add_definitions("-DEIGEN_GOOGLEHASH_SUPPORT")
|
|
|
|
include_directories(${GOOGLEHASH_INCLUDES})
|
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "GoogleHash, ")
|
|
|
|
else(GOOGLEHASH_FOUND)
|
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "GoogleHash, ")
|
|
|
|
endif(GOOGLEHASH_FOUND)
|
|
|
|
|
2010-10-13 02:23:52 +08:00
|
|
|
find_package(Adolc)
|
2009-02-28 00:19:13 +08:00
|
|
|
if(ADOLC_FOUND)
|
|
|
|
include_directories(${ADOLC_INCLUDES})
|
2010-07-15 22:29:04 +08:00
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "Adolc, ")
|
2010-10-28 22:44:20 +08:00
|
|
|
ei_add_test(forward_adolc "" ${ADOLC_LIBRARIES})
|
2009-02-28 00:19:13 +08:00
|
|
|
else(ADOLC_FOUND)
|
2010-07-15 22:29:04 +08:00
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "Adolc, ")
|
2009-03-19 04:06:06 +08:00
|
|
|
endif(ADOLC_FOUND)
|
|
|
|
|
2010-08-18 21:11:01 +08:00
|
|
|
# this test seems to never have been successful on x87, so is considered to contain a FP-related bug.
|
|
|
|
# see thread: "non-linear optimization test summary"
|
|
|
|
#ei_add_test(NonLinearOptimization)
|
|
|
|
|
2009-09-28 08:43:07 +08:00
|
|
|
ei_add_test(NumericalDiff)
|
2009-04-01 22:43:37 +08:00
|
|
|
ei_add_test(autodiff)
|
2011-02-28 10:37:34 +08:00
|
|
|
|
|
|
|
if (NOT CMAKE_CXX_COMPILER MATCHES "clang\\+\\+$")
|
2009-03-19 04:06:06 +08:00
|
|
|
ei_add_test(BVH)
|
2011-02-28 10:37:34 +08:00
|
|
|
endif()
|
|
|
|
|
2009-12-29 06:30:08 +08:00
|
|
|
ei_add_test(matrix_exponential)
|
2010-01-12 02:05:30 +08:00
|
|
|
ei_add_test(matrix_function)
|
2011-05-08 05:57:46 +08:00
|
|
|
ei_add_test(matrix_square_root)
|
2009-05-04 01:19:19 +08:00
|
|
|
ei_add_test(alignedvector3)
|
2009-05-19 12:21:04 +08:00
|
|
|
ei_add_test(FFT)
|
2009-12-02 23:03:16 +08:00
|
|
|
|
2010-07-19 19:26:52 +08:00
|
|
|
find_package(MPFR 2.3.0)
|
2010-10-17 23:04:43 +08:00
|
|
|
find_package(GMP)
|
2010-07-15 22:29:04 +08:00
|
|
|
if(MPFR_FOUND)
|
|
|
|
include_directories(${MPFR_INCLUDES})
|
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "MPFR C++, ")
|
2010-10-17 23:04:43 +08:00
|
|
|
set(EIGEN_MPFR_TEST_LIBRARIES ${MPFR_LIBRARIES} ${GMP_LIBRARIES})
|
2010-10-28 22:44:20 +08:00
|
|
|
ei_add_test(mpreal_support "" "${EIGEN_MPFR_TEST_LIBRARIES}" )
|
2010-07-15 22:29:04 +08:00
|
|
|
else()
|
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "MPFR C++, ")
|
|
|
|
endif()
|
|
|
|
|
2011-02-21 22:48:37 +08:00
|
|
|
ei_add_test(sparse_llt "" "${SPARSE_LIBS}")
|
|
|
|
ei_add_test(sparse_ldlt "" "${SPARSE_LIBS}")
|
|
|
|
ei_add_test(sparse_lu "" "${SPARSE_LIBS}")
|
2010-10-28 22:44:20 +08:00
|
|
|
ei_add_test(sparse_extra "" "")
|
2010-06-18 17:28:30 +08:00
|
|
|
|
2009-06-11 10:16:32 +08:00
|
|
|
find_package(FFTW)
|
|
|
|
if(FFTW_FOUND)
|
2010-07-22 22:08:58 +08:00
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "fftw, ")
|
2011-01-28 23:54:01 +08:00
|
|
|
if(FFTWL_LIB)
|
|
|
|
ei_add_test(FFTW "-DEIGEN_FFTW_DEFAULT -DEIGEN_HAS_FFTWL" "fftw3;fftw3f;fftw3l" )
|
|
|
|
else()
|
|
|
|
ei_add_test(FFTW "-DEIGEN_FFTW_DEFAULT " "fftw3;fftw3f" )
|
|
|
|
endif()
|
2010-07-22 22:08:58 +08:00
|
|
|
else()
|
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "fftw, ")
|
|
|
|
endif()
|
|
|
|
|
2010-10-13 02:23:52 +08:00
|
|
|
option(EIGEN_TEST_NO_OPENGL "Disable OpenGL support in unit tests" OFF)
|
|
|
|
if(NOT EIGEN_TEST_NO_OPENGL)
|
2010-10-17 23:21:10 +08:00
|
|
|
find_package(OpenGL)
|
|
|
|
find_package(GLUT)
|
|
|
|
find_package(GLEW)
|
|
|
|
if(OPENGL_FOUND AND GLUT_FOUND AND GLEW_FOUND)
|
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "OpenGL, ")
|
|
|
|
set(EIGEN_GL_LIB ${GLUT_LIBRARIES} ${GLEW_LIBRARIES})
|
|
|
|
ei_add_test(openglsupport "" "${EIGEN_GL_LIB}" )
|
|
|
|
else()
|
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "OpenGL, ")
|
|
|
|
endif()
|
2011-02-17 01:01:06 +08:00
|
|
|
else()
|
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "OpenGL, ")
|
|
|
|
endif()
|
2009-06-11 10:16:32 +08:00
|
|
|
|
2010-03-25 10:15:05 +08:00
|
|
|
find_package(GSL)
|
|
|
|
if(GSL_FOUND AND GSL_VERSION_MINOR LESS 9)
|
|
|
|
set(GSL_FOUND "")
|
|
|
|
endif(GSL_FOUND AND GSL_VERSION_MINOR LESS 9)
|
|
|
|
if(GSL_FOUND)
|
|
|
|
add_definitions("-DHAS_GSL" ${GSL_DEFINITIONS})
|
|
|
|
include_directories(${GSL_INCLUDE_DIR})
|
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "GSL, ")
|
|
|
|
else(GSL_FOUND)
|
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "GSL, ")
|
|
|
|
set(GSL_LIBRARIES " ")
|
|
|
|
endif(GSL_FOUND)
|
|
|
|
|
2010-10-17 23:31:58 +08:00
|
|
|
ei_add_test(polynomialsolver " " "${GSL_LIBRARIES}" )
|
2010-03-25 10:15:05 +08:00
|
|
|
ei_add_test(polynomialutils)
|
2011-06-22 20:39:11 +08:00
|
|
|
ei_add_test(kronecker_product)
|
2011-07-26 15:04:10 +08:00
|
|
|
ei_add_test(cg)
|