eigen/unsupported/test/CMakeLists.txt

133 lines
4.6 KiB
CMake
Raw Normal View History

set_property(GLOBAL PROPERTY EIGEN_CURRENT_SUBPROJECT "Unsupported")
add_custom_target(BuildUnsupported)
include_directories(../../test ../../unsupported ../../Eigen
${CMAKE_CURRENT_BINARY_DIR}/../../test)
find_package(GoogleHash)
if(GOOGLEHASH_FOUND)
add_definitions("-DEIGEN_GOOGLEHASH_SUPPORT")
include_directories(${GOOGLEHASH_INCLUDES})
ei_add_property(EIGEN_TESTED_BACKENDS "GoogleHash, ")
else(GOOGLEHASH_FOUND)
ei_add_property(EIGEN_MISSING_BACKENDS "GoogleHash, ")
endif(GOOGLEHASH_FOUND)
find_package(Adolc)
if(ADOLC_FOUND)
include_directories(${ADOLC_INCLUDES})
ei_add_property(EIGEN_TESTED_BACKENDS "Adolc, ")
ei_add_test(forward_adolc "" ${ADOLC_LIBRARIES})
else(ADOLC_FOUND)
ei_add_property(EIGEN_MISSING_BACKENDS "Adolc, ")
endif(ADOLC_FOUND)
# this test seems to never have been successful on x87, so is considered to contain a FP-related bug.
# see thread: "non-linear optimization test summary"
ei_add_test(NonLinearOptimization)
ei_add_test(NumericalDiff)
ei_add_test(autodiff_scalar)
ei_add_test(autodiff)
if (NOT CMAKE_CXX_COMPILER MATCHES "clang\\+\\+$")
ei_add_test(BVH)
endif()
2009-12-29 06:30:08 +08:00
ei_add_test(matrix_exponential)
ei_add_test(matrix_function)
ei_add_test(matrix_power)
ei_add_test(matrix_square_root)
ei_add_test(alignedvector3)
ei_add_test(FFT)
find_package(MPFR 2.3.0)
find_package(GMP)
if(MPFR_FOUND)
2011-08-19 21:08:29 +08:00
include_directories(${MPFR_INCLUDES} ./mpreal)
ei_add_property(EIGEN_TESTED_BACKENDS "MPFR C++, ")
set(EIGEN_MPFR_TEST_LIBRARIES ${MPFR_LIBRARIES} ${GMP_LIBRARIES})
2014-10-03 07:51:57 +08:00
# ei_add_test(mpreal_support "" "${EIGEN_MPFR_TEST_LIBRARIES}" )
else()
ei_add_property(EIGEN_MISSING_BACKENDS "MPFR C++, ")
endif()
ei_add_test(sparse_extra "" "")
find_package(FFTW)
if(FFTW_FOUND)
ei_add_property(EIGEN_TESTED_BACKENDS "fftw, ")
2012-03-15 22:18:22 +08:00
include_directories( ${FFTW_INCLUDES} )
if(FFTWL_LIB)
2011-11-03 22:33:42 +08:00
ei_add_test(FFTW "-DEIGEN_FFTW_DEFAULT -DEIGEN_HAS_FFTWL" "${FFTW_LIBRARIES}" )
else()
2012-03-15 22:18:22 +08:00
ei_add_test(FFTW "-DEIGEN_FFTW_DEFAULT" "${FFTW_LIBRARIES}" )
endif()
else()
ei_add_property(EIGEN_MISSING_BACKENDS "fftw, ")
endif()
option(EIGEN_TEST_NO_OPENGL "Disable OpenGL support in unit tests" OFF)
if(NOT EIGEN_TEST_NO_OPENGL)
2010-10-17 23:21:10 +08:00
find_package(OpenGL)
find_package(GLUT)
find_package(GLEW)
if(OPENGL_FOUND AND GLUT_FOUND AND GLEW_FOUND)
ei_add_property(EIGEN_TESTED_BACKENDS "OpenGL, ")
set(EIGEN_GL_LIB ${GLUT_LIBRARIES} ${GLEW_LIBRARIES})
ei_add_test(openglsupport "" "${EIGEN_GL_LIB}" )
else()
ei_add_property(EIGEN_MISSING_BACKENDS "OpenGL, ")
endif()
else()
ei_add_property(EIGEN_MISSING_BACKENDS "OpenGL, ")
endif()
ei_add_test(polynomialsolver)
ei_add_test(polynomialutils)
ei_add_test(kronecker_product)
ei_add_test(splines)
ei_add_test(gmres)
ei_add_test(minres)
ei_add_test(levenberg_marquardt)
2013-07-16 03:16:57 +08:00
ei_add_test(bdcsvd)
option(EIGEN_TEST_CXX11 "Enable testing of C++11 features (e.g. Tensor module)." ON)
if(EIGEN_TEST_CXX11)
2014-06-11 01:31:29 +08:00
# It should be safe to always run these tests as there is some fallback code for
# older compiler that don't support cxx11.
ei_add_test(cxx11_meta "-std=c++0x")
ei_add_test(cxx11_tensor_simple "-std=c++0x")
ei_add_test(cxx11_tensor_symmetry "-std=c++0x")
2014-10-31 15:04:13 +08:00
ei_add_test(cxx11_tensor_assign "-std=c++0x")
2014-11-05 23:49:51 +08:00
ei_add_test(cxx11_tensor_dimension "-std=c++0x")
ei_add_test(cxx11_tensor_index_list "-std=c++0x")
2014-06-07 11:16:13 +08:00
ei_add_test(cxx11_tensor_comparisons "-std=c++0x")
ei_add_test(cxx11_tensor_contraction "-std=c++0x")
ei_add_test(cxx11_tensor_convolution "-std=c++0x")
ei_add_test(cxx11_tensor_expr "-std=c++0x")
ei_add_test(cxx11_tensor_forced_eval "-std=c++0x")
ei_add_test(cxx11_tensor_fixed_size "-std=c++0x")
ei_add_test(cxx11_tensor_const "-std=c++0x")
ei_add_test(cxx11_tensor_of_const_values "-std=c++0x")
2014-10-14 08:02:09 +08:00
ei_add_test(cxx11_tensor_of_complex "-std=c++0x")
ei_add_test(cxx11_tensor_of_strings "-std=c++0x")
ei_add_test(cxx11_tensor_intdiv "-std=c++0x")
ei_add_test(cxx11_tensor_lvalue "-std=c++0x")
ei_add_test(cxx11_tensor_map "-std=c++0x")
2014-08-21 08:00:50 +08:00
ei_add_test(cxx11_tensor_broadcasting "-std=c++0x")
2014-10-11 07:11:27 +08:00
ei_add_test(cxx11_tensor_chipping "-std=c++0x")
ei_add_test(cxx11_tensor_concatenation "-std=c++0x")
2014-08-24 05:35:41 +08:00
ei_add_test(cxx11_tensor_morphing "-std=c++0x")
2014-08-14 15:25:22 +08:00
ei_add_test(cxx11_tensor_padding "-std=c++0x")
2014-10-14 01:04:04 +08:00
ei_add_test(cxx11_tensor_patch "-std=c++0x")
ei_add_test(cxx11_tensor_reduction "-std=c++0x")
2014-10-11 06:43:21 +08:00
ei_add_test(cxx11_tensor_shuffling "-std=c++0x")
2014-08-14 15:25:22 +08:00
ei_add_test(cxx11_tensor_striding "-std=c++0x")
2014-06-11 01:31:29 +08:00
# ei_add_test(cxx11_tensor_device "-std=c++0x")
2014-10-11 06:20:37 +08:00
ei_add_test(cxx11_tensor_thread_pool "-std=c++0x")
2014-10-29 14:10:13 +08:00
ei_add_test(cxx11_tensor_ref "-std=c++0x")
ei_add_test(cxx11_tensor_io "-std=c++0x")
endif()