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.

159 lines
5.8 KiB

  1. set_property(GLOBAL PROPERTY EIGEN_CURRENT_SUBPROJECT "Unsupported")
  2. add_custom_target(BuildUnsupported)
  3. include_directories(../../test ../../unsupported ../../Eigen
  4. ${CMAKE_CURRENT_BINARY_DIR}/../../test)
  5. find_package (Threads)
  6. find_package(GoogleHash)
  7. if(GOOGLEHASH_FOUND)
  8. add_definitions("-DEIGEN_GOOGLEHASH_SUPPORT")
  9. include_directories(${GOOGLEHASH_INCLUDES})
  10. ei_add_property(EIGEN_TESTED_BACKENDS "GoogleHash, ")
  11. else(GOOGLEHASH_FOUND)
  12. ei_add_property(EIGEN_MISSING_BACKENDS "GoogleHash, ")
  13. endif(GOOGLEHASH_FOUND)
  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. # this test seems to never have been successful on x87, so is considered to contain a FP-related bug.
  23. # see thread: "non-linear optimization test summary"
  24. ei_add_test(NonLinearOptimization)
  25. ei_add_test(NumericalDiff)
  26. ei_add_test(autodiff_scalar)
  27. ei_add_test(autodiff)
  28. if (NOT CMAKE_CXX_COMPILER MATCHES "clang\\+\\+$")
  29. ei_add_test(BVH)
  30. endif()
  31. ei_add_test(matrix_exponential)
  32. ei_add_test(matrix_function)
  33. ei_add_test(matrix_power)
  34. ei_add_test(matrix_square_root)
  35. ei_add_test(alignedvector3)
  36. ei_add_test(FFT)
  37. find_package(MPFR 2.3.0)
  38. find_package(GMP)
  39. if(MPFR_FOUND AND EIGEN_COMPILER_SUPPORT_CXX11)
  40. include_directories(${MPFR_INCLUDES} ./mpreal)
  41. ei_add_property(EIGEN_TESTED_BACKENDS "MPFR C++, ")
  42. set(EIGEN_MPFR_TEST_LIBRARIES ${MPFR_LIBRARIES} ${GMP_LIBRARIES})
  43. ei_add_test(mpreal_support "-std=c++11" "${EIGEN_MPFR_TEST_LIBRARIES}" )
  44. else()
  45. ei_add_property(EIGEN_MISSING_BACKENDS "MPFR C++, ")
  46. endif()
  47. ei_add_test(sparse_extra "" "")
  48. find_package(FFTW)
  49. if(FFTW_FOUND)
  50. ei_add_property(EIGEN_TESTED_BACKENDS "fftw, ")
  51. include_directories( ${FFTW_INCLUDES} )
  52. if(FFTWL_LIB)
  53. ei_add_test(FFTW "-DEIGEN_FFTW_DEFAULT -DEIGEN_HAS_FFTWL" "${FFTW_LIBRARIES}" )
  54. else()
  55. ei_add_test(FFTW "-DEIGEN_FFTW_DEFAULT" "${FFTW_LIBRARIES}" )
  56. endif()
  57. else()
  58. ei_add_property(EIGEN_MISSING_BACKENDS "fftw, ")
  59. endif()
  60. option(EIGEN_TEST_NO_OPENGL "Disable OpenGL support in unit tests" OFF)
  61. if(NOT EIGEN_TEST_NO_OPENGL)
  62. find_package(OpenGL)
  63. find_package(GLUT)
  64. find_package(GLEW)
  65. if(OPENGL_FOUND AND GLUT_FOUND AND GLEW_FOUND)
  66. include_directories(${OPENGL_INCLUDE_DIR} ${GLUT_INCLUDE_DIR} ${GLEW_INCLUDE_DIRS})
  67. ei_add_property(EIGEN_TESTED_BACKENDS "OpenGL, ")
  68. set(EIGEN_GL_LIB ${GLUT_LIBRARIES} ${GLEW_LIBRARIES} ${OPENGL_LIBRARIES})
  69. ei_add_test(openglsupport "" "${EIGEN_GL_LIB}" )
  70. else()
  71. ei_add_property(EIGEN_MISSING_BACKENDS "OpenGL, ")
  72. endif()
  73. else()
  74. ei_add_property(EIGEN_MISSING_BACKENDS "OpenGL, ")
  75. endif()
  76. ei_add_test(polynomialsolver)
  77. ei_add_test(polynomialutils)
  78. ei_add_test(splines)
  79. ei_add_test(gmres)
  80. ei_add_test(minres)
  81. ei_add_test(levenberg_marquardt)
  82. ei_add_test(kronecker_product)
  83. if(EIGEN_TEST_CXX11)
  84. # It should be safe to always run these tests as there is some fallback code for
  85. # older compiler that don't support cxx11.
  86. ei_add_test(cxx11_meta "-std=c++0x")
  87. ei_add_test(cxx11_tensor_simple "-std=c++0x")
  88. # ei_add_test(cxx11_tensor_symmetry "-std=c++0x")
  89. ei_add_test(cxx11_tensor_assign "-std=c++0x")
  90. ei_add_test(cxx11_tensor_dimension "-std=c++0x")
  91. ei_add_test(cxx11_tensor_index_list "-std=c++0x")
  92. ei_add_test(cxx11_tensor_mixed_indices "-std=c++0x")
  93. ei_add_test(cxx11_tensor_comparisons "-std=c++0x")
  94. ei_add_test(cxx11_tensor_contraction "-std=c++0x")
  95. ei_add_test(cxx11_tensor_convolution "-std=c++0x")
  96. ei_add_test(cxx11_tensor_expr "-std=c++0x")
  97. ei_add_test(cxx11_tensor_math "-std=c++0x")
  98. ei_add_test(cxx11_tensor_forced_eval "-std=c++0x")
  99. ei_add_test(cxx11_tensor_fixed_size "-std=c++0x")
  100. ei_add_test(cxx11_tensor_const "-std=c++0x")
  101. ei_add_test(cxx11_tensor_of_const_values "-std=c++0x")
  102. ei_add_test(cxx11_tensor_of_complex "-std=c++0x")
  103. ei_add_test(cxx11_tensor_of_strings "-std=c++0x")
  104. ei_add_test(cxx11_tensor_uint128 "-std=c++0x")
  105. ei_add_test(cxx11_tensor_intdiv "-std=c++0x")
  106. ei_add_test(cxx11_tensor_lvalue "-std=c++0x")
  107. ei_add_test(cxx11_tensor_map "-std=c++0x")
  108. ei_add_test(cxx11_tensor_broadcasting "-std=c++0x")
  109. ei_add_test(cxx11_tensor_chipping "-std=c++0x")
  110. ei_add_test(cxx11_tensor_concatenation "-std=c++0x")
  111. ei_add_test(cxx11_tensor_inflation "-std=c++0x")
  112. ei_add_test(cxx11_tensor_morphing "-std=c++0x")
  113. ei_add_test(cxx11_tensor_padding "-std=c++0x")
  114. ei_add_test(cxx11_tensor_patch "-std=c++0x")
  115. ei_add_test(cxx11_tensor_image_patch "-std=c++0x")
  116. ei_add_test(cxx11_tensor_volume_patch "-std=c++0x")
  117. ei_add_test(cxx11_tensor_reduction "-std=c++0x")
  118. ei_add_test(cxx11_tensor_argmax "-std=c++0x")
  119. ei_add_test(cxx11_tensor_shuffling "-std=c++0x")
  120. ei_add_test(cxx11_tensor_striding "-std=c++0x")
  121. ei_add_test(cxx11_tensor_thread_pool "-pthread" "${CMAKE_THREAD_LIBS_INIT}")
  122. ei_add_test(cxx11_tensor_ref "-std=c++0x")
  123. ei_add_test(cxx11_tensor_random "-std=c++0x")
  124. ei_add_test(cxx11_tensor_casts "-std=c++0x")
  125. ei_add_test(cxx11_tensor_reverse "-std=c++0x")
  126. ei_add_test(cxx11_tensor_layout_swap "-std=c++0x")
  127. ei_add_test(cxx11_tensor_io "-std=c++0x")
  128. ei_add_test(cxx11_tensor_generator "-std=c++0x")
  129. ei_add_test(cxx11_tensor_custom_op "-std=c++0x")
  130. ei_add_test(cxx11_tensor_custom_index "-std=c++0x")
  131. ei_add_test(cxx11_tensor_sugar "-std=c++0x")
  132. ei_add_test(cxx11_tensor_fft "-std=c++0x")
  133. ei_add_test(cxx11_tensor_ifft "-std=c++0x")
  134. # These tests needs nvcc
  135. # ei_add_test(cxx11_tensor_device "-std=c++0x")
  136. # ei_add_test(cxx11_tensor_cuda "-std=c++0x")
  137. # ei_add_test(cxx11_tensor_contract_cuda "-std=c++0x")
  138. # ei_add_test(cxx11_tensor_reduction_cuda "-std=c++0x")
  139. # ei_add_test(cxx11_tensor_random_cuda "-std=c++0x")
  140. # ei_add_test(cxx11_tensor_argmax_cuda "-std=c++0x")
  141. endif()