You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
2.5 KiB

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