2010-10-13 02:23:52 +08:00
|
|
|
|
2013-03-20 15:40:13 +08:00
|
|
|
set_property(GLOBAL PROPERTY EIGEN_CURRENT_SUBPROJECT "Unsupported")
|
|
|
|
add_custom_target(BuildUnsupported)
|
|
|
|
|
2011-03-29 21:17:49 +08:00
|
|
|
include_directories(../../test ../../unsupported ../../Eigen
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/../../test)
|
2009-02-28 00:19:13 +08:00
|
|
|
|
2015-09-03 04:51:43 +08:00
|
|
|
find_package (Threads)
|
2014-09-01 23:35:58 +08:00
|
|
|
|
2010-06-18 17:28:30 +08:00
|
|
|
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)
|
|
|
|
|
2010-10-13 02:23:52 +08:00
|
|
|
find_package(Adolc)
|
2009-02-28 00:19:13 +08:00
|
|
|
if(ADOLC_FOUND)
|
|
|
|
include_directories(${ADOLC_INCLUDES})
|
2010-07-15 22:29:04 +08:00
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "Adolc, ")
|
2010-10-28 22:44:20 +08:00
|
|
|
ei_add_test(forward_adolc "" ${ADOLC_LIBRARIES})
|
2009-02-28 00:19:13 +08:00
|
|
|
else(ADOLC_FOUND)
|
2010-07-15 22:29:04 +08:00
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "Adolc, ")
|
2009-03-19 04:06:06 +08:00
|
|
|
endif(ADOLC_FOUND)
|
|
|
|
|
2010-08-18 21:11:01 +08:00
|
|
|
# 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"
|
2012-12-08 03:53:19 +08:00
|
|
|
ei_add_test(NonLinearOptimization)
|
|
|
|
|
2009-09-28 08:43:07 +08:00
|
|
|
ei_add_test(NumericalDiff)
|
2013-11-08 01:32:24 +08:00
|
|
|
ei_add_test(autodiff_scalar)
|
2009-04-01 22:43:37 +08:00
|
|
|
ei_add_test(autodiff)
|
2011-02-28 10:37:34 +08:00
|
|
|
|
|
|
|
if (NOT CMAKE_CXX_COMPILER MATCHES "clang\\+\\+$")
|
2009-03-19 04:06:06 +08:00
|
|
|
ei_add_test(BVH)
|
2011-02-28 10:37:34 +08:00
|
|
|
endif()
|
|
|
|
|
2016-02-19 14:20:50 +08:00
|
|
|
ei_add_test(matrix_exponential)
|
2010-01-12 02:05:30 +08:00
|
|
|
ei_add_test(matrix_function)
|
2016-02-19 14:20:50 +08:00
|
|
|
ei_add_test(matrix_power)
|
2011-05-08 05:57:46 +08:00
|
|
|
ei_add_test(matrix_square_root)
|
2009-05-04 01:19:19 +08:00
|
|
|
ei_add_test(alignedvector3)
|
2014-09-01 23:35:58 +08:00
|
|
|
|
2009-05-19 12:21:04 +08:00
|
|
|
ei_add_test(FFT)
|
2009-12-02 23:03:16 +08:00
|
|
|
|
2010-07-19 19:26:52 +08:00
|
|
|
find_package(MPFR 2.3.0)
|
2010-10-17 23:04:43 +08:00
|
|
|
find_package(GMP)
|
2015-10-28 00:35:54 +08:00
|
|
|
if(MPFR_FOUND AND EIGEN_COMPILER_SUPPORT_CXX11)
|
2011-08-19 21:08:29 +08:00
|
|
|
include_directories(${MPFR_INCLUDES} ./mpreal)
|
2010-07-15 22:29:04 +08:00
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "MPFR C++, ")
|
2010-10-17 23:04:43 +08:00
|
|
|
set(EIGEN_MPFR_TEST_LIBRARIES ${MPFR_LIBRARIES} ${GMP_LIBRARIES})
|
2015-10-28 00:35:54 +08:00
|
|
|
ei_add_test(mpreal_support "-std=c++11" "${EIGEN_MPFR_TEST_LIBRARIES}" )
|
2010-07-15 22:29:04 +08:00
|
|
|
else()
|
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "MPFR C++, ")
|
|
|
|
endif()
|
|
|
|
|
2010-10-28 22:44:20 +08:00
|
|
|
ei_add_test(sparse_extra "" "")
|
2010-06-18 17:28:30 +08:00
|
|
|
|
2009-06-11 10:16:32 +08:00
|
|
|
find_package(FFTW)
|
|
|
|
if(FFTW_FOUND)
|
2010-07-22 22:08:58 +08:00
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "fftw, ")
|
2012-03-15 22:18:22 +08:00
|
|
|
include_directories( ${FFTW_INCLUDES} )
|
2011-01-28 23:54:01 +08:00
|
|
|
if(FFTWL_LIB)
|
2011-11-03 22:33:42 +08:00
|
|
|
ei_add_test(FFTW "-DEIGEN_FFTW_DEFAULT -DEIGEN_HAS_FFTWL" "${FFTW_LIBRARIES}" )
|
2011-01-28 23:54:01 +08:00
|
|
|
else()
|
2012-03-15 22:18:22 +08:00
|
|
|
ei_add_test(FFTW "-DEIGEN_FFTW_DEFAULT" "${FFTW_LIBRARIES}" )
|
2011-01-28 23:54:01 +08:00
|
|
|
endif()
|
2010-07-22 22:08:58 +08:00
|
|
|
else()
|
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "fftw, ")
|
|
|
|
endif()
|
|
|
|
|
2010-10-13 02:23:52 +08:00
|
|
|
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)
|
2014-12-04 14:18:47 +08:00
|
|
|
include_directories(${OPENGL_INCLUDE_DIR} ${GLUT_INCLUDE_DIR} ${GLEW_INCLUDE_DIRS})
|
2010-10-17 23:21:10 +08:00
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "OpenGL, ")
|
2014-12-04 14:18:47 +08:00
|
|
|
set(EIGEN_GL_LIB ${GLUT_LIBRARIES} ${GLEW_LIBRARIES} ${OPENGL_LIBRARIES})
|
2010-10-17 23:21:10 +08:00
|
|
|
ei_add_test(openglsupport "" "${EIGEN_GL_LIB}" )
|
|
|
|
else()
|
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "OpenGL, ")
|
|
|
|
endif()
|
2011-02-17 01:01:06 +08:00
|
|
|
else()
|
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "OpenGL, ")
|
|
|
|
endif()
|
2009-06-11 10:16:32 +08:00
|
|
|
|
2012-04-11 15:48:01 +08:00
|
|
|
ei_add_test(polynomialsolver)
|
2010-03-25 10:15:05 +08:00
|
|
|
ei_add_test(polynomialutils)
|
2011-11-25 21:53:40 +08:00
|
|
|
ei_add_test(splines)
|
2012-03-29 21:00:55 +08:00
|
|
|
ei_add_test(gmres)
|
2012-09-24 22:47:38 +08:00
|
|
|
ei_add_test(minres)
|
2012-12-09 01:22:23 +08:00
|
|
|
ei_add_test(levenberg_marquardt)
|
2014-09-19 04:08:49 +08:00
|
|
|
ei_add_test(kronecker_product)
|
2013-11-15 05:27:06 +08:00
|
|
|
|
|
|
|
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.
|
2013-11-15 05:27:06 +08:00
|
|
|
ei_add_test(cxx11_meta "-std=c++0x")
|
2013-11-15 05:52:37 +08:00
|
|
|
ei_add_test(cxx11_tensor_simple "-std=c++0x")
|
2015-01-15 07:46:04 +08:00
|
|
|
# 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")
|
2014-11-13 14:25:38 +08:00
|
|
|
ei_add_test(cxx11_tensor_index_list "-std=c++0x")
|
2015-02-28 04:57:13 +08:00
|
|
|
ei_add_test(cxx11_tensor_mixed_indices "-std=c++0x")
|
2014-06-07 11:16:13 +08:00
|
|
|
ei_add_test(cxx11_tensor_comparisons "-std=c++0x")
|
2014-06-06 01:49:34 +08:00
|
|
|
ei_add_test(cxx11_tensor_contraction "-std=c++0x")
|
2014-06-11 01:23:32 +08:00
|
|
|
ei_add_test(cxx11_tensor_convolution "-std=c++0x")
|
2014-04-29 01:32:27 +08:00
|
|
|
ei_add_test(cxx11_tensor_expr "-std=c++0x")
|
2015-07-18 00:29:00 +08:00
|
|
|
ei_add_test(cxx11_tensor_math "-std=c++0x")
|
2014-10-03 01:39:36 +08:00
|
|
|
ei_add_test(cxx11_tensor_forced_eval "-std=c++0x")
|
2014-11-06 15:25:11 +08:00
|
|
|
ei_add_test(cxx11_tensor_fixed_size "-std=c++0x")
|
2014-10-03 01:30:44 +08:00
|
|
|
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")
|
2014-10-02 11:21:42 +08:00
|
|
|
ei_add_test(cxx11_tensor_of_strings "-std=c++0x")
|
2014-08-15 13:13:21 +08:00
|
|
|
ei_add_test(cxx11_tensor_intdiv "-std=c++0x")
|
2014-06-14 01:20:28 +08:00
|
|
|
ei_add_test(cxx11_tensor_lvalue "-std=c++0x")
|
2014-04-29 01:32:27 +08:00
|
|
|
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")
|
2014-10-02 11:38:22 +08:00
|
|
|
ei_add_test(cxx11_tensor_concatenation "-std=c++0x")
|
2015-07-17 00:04:05 +08:00
|
|
|
ei_add_test(cxx11_tensor_inflation "-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")
|
2014-11-14 01:28:54 +08:00
|
|
|
ei_add_test(cxx11_tensor_image_patch "-std=c++0x")
|
2015-07-01 05:48:26 +08:00
|
|
|
ei_add_test(cxx11_tensor_volume_patch "-std=c++0x")
|
2014-10-02 11:38:22 +08:00
|
|
|
ei_add_test(cxx11_tensor_reduction "-std=c++0x")
|
2015-08-31 23:18:53 +08:00
|
|
|
ei_add_test(cxx11_tensor_argmax "-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")
|
2015-09-03 04:51:43 +08:00
|
|
|
ei_add_test(cxx11_tensor_thread_pool "-pthread" "${CMAKE_THREAD_LIBS_INIT}")
|
2014-10-29 14:10:13 +08:00
|
|
|
ei_add_test(cxx11_tensor_ref "-std=c++0x")
|
2015-01-15 07:46:04 +08:00
|
|
|
ei_add_test(cxx11_tensor_random "-std=c++0x")
|
|
|
|
ei_add_test(cxx11_tensor_casts "-std=c++0x")
|
|
|
|
ei_add_test(cxx11_tensor_reverse "-std=c++0x")
|
|
|
|
ei_add_test(cxx11_tensor_layout_swap "-std=c++0x")
|
2014-10-11 07:17:26 +08:00
|
|
|
ei_add_test(cxx11_tensor_io "-std=c++0x")
|
2015-04-23 02:14:58 +08:00
|
|
|
ei_add_test(cxx11_tensor_generator "-std=c++0x")
|
2015-07-01 06:36:29 +08:00
|
|
|
ei_add_test(cxx11_tensor_custom_op "-std=c++0x")
|
2015-10-15 00:31:37 +08:00
|
|
|
ei_add_test(cxx11_tensor_custom_index "-std=c++0x")
|
2015-10-22 02:28:28 +08:00
|
|
|
ei_add_test(cxx11_tensor_sugar "-std=c++0x")
|
2015-10-23 07:52:55 +08:00
|
|
|
ei_add_test(cxx11_tensor_fft "-std=c++0x")
|
|
|
|
ei_add_test(cxx11_tensor_ifft "-std=c++0x")
|
2016-01-28 09:09:30 +08:00
|
|
|
ei_add_test(cxx11_tensor_empty "-std=c++0x")
|
2015-01-15 07:46:04 +08:00
|
|
|
|
2016-02-06 10:14:23 +08:00
|
|
|
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
|
|
|
# This test requires __uint128_t which is only available on 64bit systems
|
|
|
|
ei_add_test(cxx11_tensor_uint128 "-std=c++0x")
|
|
|
|
endif()
|
|
|
|
|
2013-11-15 05:27:06 +08:00
|
|
|
endif()
|
2016-01-28 04:22:17 +08:00
|
|
|
|
|
|
|
# These tests needs nvcc
|
2016-01-28 16:35:37 +08:00
|
|
|
find_package(CUDA 7.0)
|
2016-01-28 04:22:17 +08:00
|
|
|
if(CUDA_FOUND)
|
|
|
|
set(CUDA_PROPAGATE_HOST_FLAGS OFF)
|
|
|
|
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
|
|
|
set(CUDA_NVCC_FLAGS "-ccbin /usr/bin/clang" CACHE STRING "nvcc flags" FORCE)
|
|
|
|
endif()
|
2016-02-26 01:06:18 +08:00
|
|
|
set(CUDA_NVCC_FLAGS "-std=c++11 --relaxed-constexpr -arch compute_${EIGEN_CUDA_COMPUTE_ARCH} -Xcudafe \"--display_error_number\"")
|
2016-01-28 04:22:17 +08:00
|
|
|
cuda_include_directories("${CMAKE_CURRENT_BINARY_DIR}" "${CUDA_TOOLKIT_ROOT_DIR}/include")
|
2016-01-28 06:46:34 +08:00
|
|
|
set(EIGEN_ADD_TEST_FILENAME_EXTENSION "cu")
|
|
|
|
|
|
|
|
ei_add_test(cxx11_tensor_device)
|
|
|
|
ei_add_test(cxx11_tensor_cuda)
|
|
|
|
ei_add_test(cxx11_tensor_contract_cuda)
|
|
|
|
ei_add_test(cxx11_tensor_reduction_cuda)
|
|
|
|
ei_add_test(cxx11_tensor_random_cuda)
|
|
|
|
ei_add_test(cxx11_tensor_argmax_cuda)
|
2016-01-28 04:22:17 +08:00
|
|
|
|
2016-02-26 01:06:18 +08:00
|
|
|
# Half floats are only supported starting with arch 5.3
|
|
|
|
if (${EIGEN_CUDA_COMPUTE_ARCH} GREATER 52)
|
|
|
|
ei_add_test(cxx11_tensor_of_float16_cuda)
|
|
|
|
endif()
|
2016-02-19 14:16:07 +08:00
|
|
|
|
2016-01-28 04:22:17 +08:00
|
|
|
unset(EIGEN_ADD_TEST_FILENAME_EXTENSION)
|
2016-01-28 16:35:37 +08:00
|
|
|
endif()
|