1 2 include_directories(../../test ../../unsupported ../../Eigen 3 ${CMAKE_CURRENT_BINARY_DIR}/../../test) 4 5 find_package(GoogleHash) 6 if(GOOGLEHASH_FOUND) 7 add_definitions("-DEIGEN_GOOGLEHASH_SUPPORT") 8 include_directories(${GOOGLEHASH_INCLUDES}) 9 ei_add_property(EIGEN_TESTED_BACKENDS "GoogleHash, ") 10 else(GOOGLEHASH_FOUND) 11 ei_add_property(EIGEN_MISSING_BACKENDS "GoogleHash, ") 12 endif(GOOGLEHASH_FOUND) 13 14 find_package(Adolc) 15 if(ADOLC_FOUND) 16 include_directories(${ADOLC_INCLUDES}) 17 ei_add_property(EIGEN_TESTED_BACKENDS "Adolc, ") 18 ei_add_test(forward_adolc "" ${ADOLC_LIBRARIES}) 19 else(ADOLC_FOUND) 20 ei_add_property(EIGEN_MISSING_BACKENDS "Adolc, ") 21 endif(ADOLC_FOUND) 22 23 # this test seems to never have been successful on x87, so is considered to contain a FP-related bug. 24 # see thread: "non-linear optimization test summary" 25 #ei_add_test(NonLinearOptimization) 26 27 ei_add_test(NumericalDiff) 28 ei_add_test(autodiff) 29 30 if (NOT CMAKE_CXX_COMPILER MATCHES "clang\\+\\+$") 31 ei_add_test(BVH) 32 endif() 33 34 ei_add_test(matrix_exponential) 35 ei_add_test(matrix_function) 36 ei_add_test(matrix_square_root) 37 ei_add_test(alignedvector3) 38 ei_add_test(FFT) 39 40 find_package(MPFR 2.3.0) 41 find_package(GMP) 42 if(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}" ) 47 else() 48 ei_add_property(EIGEN_MISSING_BACKENDS "MPFR C++, ") 49 endif() 50 51 ei_add_test(sparse_extra "" "") 52 53 find_package(FFTW) 54 if(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() 62 else() 63 ei_add_property(EIGEN_MISSING_BACKENDS "fftw, ") 64 endif() 65 66 option(EIGEN_TEST_NO_OPENGL "Disable OpenGL support in unit tests" OFF) 67 if(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 ei_add_property(EIGEN_TESTED_BACKENDS "OpenGL, ") 73 set(EIGEN_GL_LIB ${GLUT_LIBRARIES} ${GLEW_LIBRARIES}) 74 ei_add_test(openglsupport "" "${EIGEN_GL_LIB}" ) 75 else() 76 ei_add_property(EIGEN_MISSING_BACKENDS "OpenGL, ") 77 endif() 78 else() 79 ei_add_property(EIGEN_MISSING_BACKENDS "OpenGL, ") 80 endif() 81 82 ei_add_test(polynomialsolver) 83 ei_add_test(polynomialutils) 84 ei_add_test(kronecker_product) 85 ei_add_test(splines) 86 ei_add_test(gmres) 87 88