1 2set_property(GLOBAL PROPERTY EIGEN_CURRENT_SUBPROJECT "Unsupported") 3add_custom_target(BuildUnsupported) 4 5include_directories(../../test ../../unsupported ../../Eigen 6 ${CMAKE_CURRENT_BINARY_DIR}/../../test) 7 8find_package(GoogleHash) 9if(GOOGLEHASH_FOUND) 10 add_definitions("-DEIGEN_GOOGLEHASH_SUPPORT") 11 include_directories(${GOOGLEHASH_INCLUDES}) 12 ei_add_property(EIGEN_TESTED_BACKENDS "GoogleHash, ") 13else(GOOGLEHASH_FOUND) 14 ei_add_property(EIGEN_MISSING_BACKENDS "GoogleHash, ") 15endif(GOOGLEHASH_FOUND) 16 17find_package(Adolc) 18if(ADOLC_FOUND) 19 include_directories(${ADOLC_INCLUDES}) 20 ei_add_property(EIGEN_TESTED_BACKENDS "Adolc, ") 21 ei_add_test(forward_adolc "" ${ADOLC_LIBRARIES}) 22else(ADOLC_FOUND) 23 ei_add_property(EIGEN_MISSING_BACKENDS "Adolc, ") 24endif(ADOLC_FOUND) 25 26# this test seems to never have been successful on x87, so is considered to contain a FP-related bug. 27# see thread: "non-linear optimization test summary" 28ei_add_test(NonLinearOptimization) 29 30ei_add_test(NumericalDiff) 31ei_add_test(autodiff) 32ei_add_test(BVH) 33ei_add_test(matrix_exponential) 34ei_add_test(matrix_function) 35ei_add_test(matrix_power) 36ei_add_test(matrix_square_root) 37ei_add_test(alignedvector3) 38ei_add_test(FFT) 39 40find_package(MPFR 2.3.0) 41find_package(GMP) 42if(MPFR_FOUND) 43 include_directories(${MPFR_INCLUDES} ./mpreal) 44 ei_add_property(EIGEN_TESTED_BACKENDS "MPFR C++, ") 45 set(EIGEN_MPFR_TEST_LIBRARIES ${MPFR_LIBRARIES} ${GMP_LIBRARIES}) 46 ei_add_test(mpreal_support "" "${EIGEN_MPFR_TEST_LIBRARIES}" ) 47else() 48 ei_add_property(EIGEN_MISSING_BACKENDS "MPFR C++, ") 49endif() 50 51ei_add_test(sparse_extra "" "") 52 53find_package(FFTW) 54if(FFTW_FOUND) 55 ei_add_property(EIGEN_TESTED_BACKENDS "fftw, ") 56 include_directories( ${FFTW_INCLUDES} ) 57 if(FFTWL_LIB) 58 ei_add_test(FFTW "-DEIGEN_FFTW_DEFAULT -DEIGEN_HAS_FFTWL" "${FFTW_LIBRARIES}" ) 59 else() 60 ei_add_test(FFTW "-DEIGEN_FFTW_DEFAULT" "${FFTW_LIBRARIES}" ) 61 endif() 62else() 63 ei_add_property(EIGEN_MISSING_BACKENDS "fftw, ") 64endif() 65 66option(EIGEN_TEST_NO_OPENGL "Disable OpenGL support in unit tests" OFF) 67if(NOT EIGEN_TEST_NO_OPENGL) 68 find_package(OpenGL) 69 find_package(GLUT) 70 find_package(GLEW) 71 if(OPENGL_FOUND AND GLUT_FOUND AND GLEW_FOUND) 72 include_directories(${OPENGL_INCLUDE_DIR} ${GLUT_INCLUDE_DIR} ${GLEW_INCLUDE_DIRS}) 73 ei_add_property(EIGEN_TESTED_BACKENDS "OpenGL, ") 74 set(EIGEN_GL_LIB ${GLUT_LIBRARIES} ${GLEW_LIBRARIES} ${OPENGL_LIBRARIES}) 75 ei_add_test(openglsupport "" "${EIGEN_GL_LIB}" ) 76 else() 77 ei_add_property(EIGEN_MISSING_BACKENDS "OpenGL, ") 78 endif() 79else() 80 ei_add_property(EIGEN_MISSING_BACKENDS "OpenGL, ") 81endif() 82 83ei_add_test(polynomialsolver) 84ei_add_test(polynomialutils) 85ei_add_test(kronecker_product) 86ei_add_test(splines) 87ei_add_test(gmres) 88ei_add_test(minres) 89ei_add_test(levenberg_marquardt) 90ei_add_test(bdcsvd) 91