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.

88 lines
2.6 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_power)
  30. ei_add_test(matrix_square_root)
  31. ei_add_test(alignedvector3)
  32. ei_add_test(FFT)
  33. find_package(MPFR 2.3.0)
  34. find_package(GMP)
  35. if(MPFR_FOUND)
  36. include_directories(${MPFR_INCLUDES} ./mpreal)
  37. ei_add_property(EIGEN_TESTED_BACKENDS "MPFR C++, ")
  38. set(EIGEN_MPFR_TEST_LIBRARIES ${MPFR_LIBRARIES} ${GMP_LIBRARIES})
  39. ei_add_test(mpreal_support "" "${EIGEN_MPFR_TEST_LIBRARIES}" )
  40. else()
  41. ei_add_property(EIGEN_MISSING_BACKENDS "MPFR C++, ")
  42. endif()
  43. ei_add_test(sparse_extra "" "")
  44. find_package(FFTW)
  45. if(FFTW_FOUND)
  46. ei_add_property(EIGEN_TESTED_BACKENDS "fftw, ")
  47. include_directories( ${FFTW_INCLUDES} )
  48. if(FFTWL_LIB)
  49. ei_add_test(FFTW "-DEIGEN_FFTW_DEFAULT -DEIGEN_HAS_FFTWL" "${FFTW_LIBRARIES}" )
  50. else()
  51. ei_add_test(FFTW "-DEIGEN_FFTW_DEFAULT" "${FFTW_LIBRARIES}" )
  52. endif()
  53. else()
  54. ei_add_property(EIGEN_MISSING_BACKENDS "fftw, ")
  55. endif()
  56. option(EIGEN_TEST_NO_OPENGL "Disable OpenGL support in unit tests" OFF)
  57. if(NOT EIGEN_TEST_NO_OPENGL)
  58. find_package(OpenGL)
  59. find_package(GLUT)
  60. find_package(GLEW)
  61. if(OPENGL_FOUND AND GLUT_FOUND AND GLEW_FOUND)
  62. ei_add_property(EIGEN_TESTED_BACKENDS "OpenGL, ")
  63. set(EIGEN_GL_LIB ${GLUT_LIBRARIES} ${GLEW_LIBRARIES})
  64. ei_add_test(openglsupport "" "${EIGEN_GL_LIB}" )
  65. else()
  66. ei_add_property(EIGEN_MISSING_BACKENDS "OpenGL, ")
  67. endif()
  68. else()
  69. ei_add_property(EIGEN_MISSING_BACKENDS "OpenGL, ")
  70. endif()
  71. ei_add_test(polynomialsolver)
  72. ei_add_test(polynomialutils)
  73. ei_add_test(kronecker_product)
  74. ei_add_test(splines)
  75. ei_add_test(gmres)