2009-10-03 00:45:24 +08:00
|
|
|
project(EigenTesting)
|
2009-11-13 04:02:52 +08:00
|
|
|
add_custom_target(buildtests)
|
|
|
|
add_custom_target(check COMMAND "ctest")
|
|
|
|
add_dependencies(check buildtests)
|
|
|
|
|
2008-08-23 23:14:20 +08:00
|
|
|
find_package(GSL)
|
2009-01-28 00:04:16 +08:00
|
|
|
if(GSL_FOUND AND GSL_VERSION_MINOR LESS 9)
|
|
|
|
set(GSL_FOUND "")
|
|
|
|
endif(GSL_FOUND AND GSL_VERSION_MINOR LESS 9)
|
2008-08-23 23:14:20 +08:00
|
|
|
if(GSL_FOUND)
|
2009-01-27 04:00:41 +08:00
|
|
|
add_definitions("-DHAS_GSL" ${GSL_DEFINITIONS})
|
|
|
|
include_directories(${GSL_INCLUDE_DIR})
|
2009-02-28 00:19:13 +08:00
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "GSL, ")
|
2008-12-18 01:50:43 +08:00
|
|
|
else(GSL_FOUND)
|
2009-02-28 00:19:13 +08:00
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "GSL, ")
|
2008-12-18 01:50:43 +08:00
|
|
|
set(GSL_LIBRARIES " ")
|
2008-08-23 23:14:20 +08:00
|
|
|
endif(GSL_FOUND)
|
2008-08-19 19:06:40 +08:00
|
|
|
|
2008-10-27 05:38:30 +08:00
|
|
|
set(SPARSE_LIBS "")
|
|
|
|
|
2008-10-20 18:43:11 +08:00
|
|
|
find_package(Taucs)
|
|
|
|
if(TAUCS_FOUND)
|
|
|
|
add_definitions("-DEIGEN_TAUCS_SUPPORT")
|
|
|
|
include_directories(${TAUCS_INCLUDES})
|
2008-10-27 05:38:30 +08:00
|
|
|
set(SPARSE_LIBS ${SPARSE_LIBS} ${TAUCS_LIBRARIES})
|
2009-02-28 00:19:13 +08:00
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "Taucs, ")
|
2008-10-21 21:35:04 +08:00
|
|
|
else(TAUCS_FOUND)
|
2009-02-28 00:19:13 +08:00
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "Taucs, ")
|
2008-10-20 18:43:11 +08:00
|
|
|
endif(TAUCS_FOUND)
|
|
|
|
|
|
|
|
find_package(Cholmod)
|
|
|
|
if(CHOLMOD_FOUND)
|
|
|
|
add_definitions("-DEIGEN_CHOLMOD_SUPPORT")
|
|
|
|
include_directories(${CHOLMOD_INCLUDES})
|
2008-10-27 05:38:30 +08:00
|
|
|
set(SPARSE_LIBS ${SPARSE_LIBS} ${CHOLMOD_LIBRARIES})
|
2009-02-28 00:19:13 +08:00
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "Cholmod, ")
|
2008-10-21 21:35:04 +08:00
|
|
|
else(CHOLMOD_FOUND)
|
2009-02-28 00:19:13 +08:00
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "Cholmod, ")
|
2008-10-20 18:43:11 +08:00
|
|
|
endif(CHOLMOD_FOUND)
|
|
|
|
|
2008-10-20 19:37:45 +08:00
|
|
|
find_package(Umfpack)
|
|
|
|
if(UMFPACK_FOUND)
|
|
|
|
add_definitions("-DEIGEN_UMFPACK_SUPPORT")
|
|
|
|
include_directories(${UMFPACK_INCLUDES})
|
2008-10-27 05:38:30 +08:00
|
|
|
set(SPARSE_LIBS ${SPARSE_LIBS} ${UMFPACK_LIBRARIES})
|
2009-02-28 00:19:13 +08:00
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "UmfPack, ")
|
2008-10-21 21:35:04 +08:00
|
|
|
else(UMFPACK_FOUND)
|
2009-02-28 00:19:13 +08:00
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "UmfPack, ")
|
2008-10-20 19:37:45 +08:00
|
|
|
endif(UMFPACK_FOUND)
|
|
|
|
|
|
|
|
find_package(SuperLU)
|
|
|
|
if(SUPERLU_FOUND)
|
|
|
|
add_definitions("-DEIGEN_SUPERLU_SUPPORT")
|
|
|
|
include_directories(${SUPERLU_INCLUDES})
|
2008-10-27 05:38:30 +08:00
|
|
|
set(SPARSE_LIBS ${SPARSE_LIBS} ${SUPERLU_LIBRARIES})
|
2009-02-28 00:19:13 +08:00
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "SuperLU, ")
|
2008-10-21 21:35:04 +08:00
|
|
|
else(SUPERLU_FOUND)
|
2009-02-28 00:19:13 +08:00
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "SuperLU, ")
|
2008-10-20 19:37:45 +08:00
|
|
|
endif(SUPERLU_FOUND)
|
2008-10-20 18:43:11 +08:00
|
|
|
|
2008-10-21 21:35:04 +08:00
|
|
|
find_package(GoogleHash)
|
|
|
|
if(GOOGLEHASH_FOUND)
|
|
|
|
add_definitions("-DEIGEN_GOOGLEHASH_SUPPORT")
|
|
|
|
include_directories(${GOOGLEHASH_INCLUDES})
|
2009-02-28 00:19:13 +08:00
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "GoogleHash, ")
|
2008-10-21 21:35:04 +08:00
|
|
|
else(GOOGLEHASH_FOUND)
|
2009-02-28 00:19:13 +08:00
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "GoogleHash, ")
|
2008-10-21 21:35:04 +08:00
|
|
|
endif(GOOGLEHASH_FOUND)
|
|
|
|
|
2009-01-23 17:50:16 +08:00
|
|
|
option(EIGEN_TEST_NOQT "Disable Qt support in unit tests" OFF)
|
|
|
|
if(NOT EIGEN_TEST_NOQT)
|
|
|
|
find_package(Qt4)
|
|
|
|
endif(NOT EIGEN_TEST_NOQT)
|
2009-01-23 21:17:57 +08:00
|
|
|
if(QT4_FOUND)
|
|
|
|
include(${QT_USE_FILE})
|
2009-02-28 00:19:13 +08:00
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "Qt4 support, ")
|
2009-01-23 21:17:57 +08:00
|
|
|
else(QT4_FOUND)
|
2009-02-28 00:19:13 +08:00
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "Qt4 support, ")
|
2009-01-23 21:17:57 +08:00
|
|
|
endif(QT4_FOUND)
|
|
|
|
|
2008-10-20 18:43:11 +08:00
|
|
|
if(TEST_LIB)
|
|
|
|
add_definitions("-DEIGEN_EXTERN_INSTANTIATIONS=1")
|
|
|
|
endif(TEST_LIB)
|
|
|
|
|
|
|
|
ei_add_test(meta)
|
|
|
|
ei_add_test(sizeof)
|
|
|
|
ei_add_test(dynalloc)
|
|
|
|
ei_add_test(nomalloc)
|
2010-01-03 01:38:16 +08:00
|
|
|
ei_add_test(first_aligned)
|
2008-12-23 03:17:44 +08:00
|
|
|
ei_add_test(mixingtypes)
|
2008-10-20 18:43:11 +08:00
|
|
|
ei_add_test(packetmath)
|
2008-12-31 08:05:22 +08:00
|
|
|
ei_add_test(unalignedassert)
|
2009-01-08 06:20:03 +08:00
|
|
|
ei_add_test(vectorization_logic)
|
2008-10-20 18:43:11 +08:00
|
|
|
ei_add_test(basicstuff)
|
|
|
|
ei_add_test(linearstructure)
|
2010-04-29 06:51:38 +08:00
|
|
|
ei_add_test(integer_types)
|
2008-10-20 18:43:11 +08:00
|
|
|
ei_add_test(cwiseop)
|
2009-11-20 22:39:38 +08:00
|
|
|
ei_add_test(unalignedcount)
|
2009-02-12 23:18:59 +08:00
|
|
|
ei_add_test(redux)
|
2009-09-17 02:18:30 +08:00
|
|
|
ei_add_test(visitor)
|
2010-02-26 22:03:13 +08:00
|
|
|
ei_add_test(block)
|
2010-04-23 02:11:18 +08:00
|
|
|
ei_add_test(corners)
|
2008-10-20 18:43:11 +08:00
|
|
|
ei_add_test(product_small)
|
2009-11-12 05:11:33 +08:00
|
|
|
ei_add_test(product_large)
|
|
|
|
ei_add_test(product_extra)
|
2009-06-29 03:27:37 +08:00
|
|
|
ei_add_test(diagonalmatrices)
|
2008-10-20 18:43:11 +08:00
|
|
|
ei_add_test(adjoint)
|
2010-02-26 22:03:13 +08:00
|
|
|
ei_add_test(diagonal)
|
2008-10-20 18:43:11 +08:00
|
|
|
ei_add_test(miscmatrices)
|
|
|
|
ei_add_test(commainitializer)
|
|
|
|
ei_add_test(smallvectors)
|
|
|
|
ei_add_test(map)
|
2010-02-27 09:12:51 +08:00
|
|
|
ei_add_test(mapstride)
|
2008-10-20 18:43:11 +08:00
|
|
|
ei_add_test(array)
|
2010-01-19 05:54:20 +08:00
|
|
|
ei_add_test(array_for_matrix)
|
2009-03-05 18:25:22 +08:00
|
|
|
ei_add_test(array_replicate)
|
|
|
|
ei_add_test(array_reverse)
|
2008-10-20 18:43:11 +08:00
|
|
|
ei_add_test(triangular)
|
2010-05-19 22:35:34 +08:00
|
|
|
ei_add_test(selfadjoint)
|
2009-11-12 05:11:33 +08:00
|
|
|
ei_add_test(product_selfadjoint)
|
|
|
|
ei_add_test(product_symm)
|
|
|
|
ei_add_test(product_syrk)
|
|
|
|
ei_add_test(product_trmv)
|
|
|
|
ei_add_test(product_trmm)
|
2009-12-23 18:48:53 +08:00
|
|
|
ei_add_test(product_trsolve)
|
2009-11-12 05:11:33 +08:00
|
|
|
ei_add_test(product_notemporary)
|
2009-09-07 18:46:16 +08:00
|
|
|
ei_add_test(stable_norm)
|
2009-07-15 05:27:37 +08:00
|
|
|
ei_add_test(bandmatrix)
|
2008-11-05 21:47:55 +08:00
|
|
|
ei_add_test(cholesky " " "${GSL_LIBRARIES}")
|
2009-11-12 05:11:33 +08:00
|
|
|
ei_add_test(lu)
|
2008-10-20 18:43:11 +08:00
|
|
|
ei_add_test(determinant)
|
2009-11-12 05:11:33 +08:00
|
|
|
ei_add_test(inverse)
|
2008-10-20 18:43:11 +08:00
|
|
|
ei_add_test(qr)
|
2009-08-24 06:04:33 +08:00
|
|
|
ei_add_test(qr_colpivoting)
|
|
|
|
ei_add_test(qr_fullpivoting)
|
2010-01-15 11:30:58 +08:00
|
|
|
ei_add_test(upperbidiagonalization)
|
2010-04-02 21:32:20 +08:00
|
|
|
ei_add_test(hessenberg)
|
|
|
|
ei_add_test(schur_real)
|
|
|
|
ei_add_test(schur_complex)
|
2009-03-23 22:38:59 +08:00
|
|
|
ei_add_test(eigensolver_selfadjoint " " "${GSL_LIBRARIES}")
|
|
|
|
ei_add_test(eigensolver_generic " " "${GSL_LIBRARIES}")
|
2009-09-01 22:20:56 +08:00
|
|
|
ei_add_test(eigensolver_complex)
|
2008-10-20 18:43:11 +08:00
|
|
|
ei_add_test(svd)
|
2009-11-12 05:11:33 +08:00
|
|
|
ei_add_test(jacobisvd)
|
2009-02-17 17:53:05 +08:00
|
|
|
ei_add_test(geo_orthomethods)
|
2009-03-05 18:25:22 +08:00
|
|
|
ei_add_test(geo_homogeneous)
|
2009-02-17 17:53:05 +08:00
|
|
|
ei_add_test(geo_quaternion)
|
|
|
|
ei_add_test(geo_transformations)
|
|
|
|
ei_add_test(geo_eulerangles)
|
|
|
|
ei_add_test(geo_hyperplane)
|
|
|
|
ei_add_test(geo_parametrizedline)
|
|
|
|
ei_add_test(geo_alignedbox)
|
2009-01-10 07:26:45 +08:00
|
|
|
ei_add_test(stdvector)
|
2010-01-28 03:34:05 +08:00
|
|
|
ei_add_test(stdvector_overload)
|
2010-04-19 02:10:43 +08:00
|
|
|
ei_add_test(stdlist)
|
2009-02-03 09:43:59 +08:00
|
|
|
ei_add_test(resize)
|
2009-01-21 00:50:47 +08:00
|
|
|
if(QT4_FOUND)
|
2009-08-02 21:09:34 +08:00
|
|
|
ei_add_test(qtvector " " "${QT_QTCORE_LIBRARY}")
|
2009-01-21 00:50:47 +08:00
|
|
|
endif(QT4_FOUND)
|
2009-01-12 05:59:04 +08:00
|
|
|
ei_add_test(sparse_vector)
|
2009-01-14 22:24:10 +08:00
|
|
|
ei_add_test(sparse_basic)
|
2009-02-09 17:59:30 +08:00
|
|
|
ei_add_test(sparse_product)
|
2008-11-05 21:47:55 +08:00
|
|
|
ei_add_test(sparse_solvers " " "${SPARSE_LIBS}")
|
2009-05-27 01:22:25 +08:00
|
|
|
ei_add_test(umeyama)
|
2009-08-03 22:06:57 +08:00
|
|
|
ei_add_test(householder)
|
2009-09-03 04:56:48 +08:00
|
|
|
ei_add_test(swap)
|
2009-09-03 23:27:51 +08:00
|
|
|
ei_add_test(conservative_resize)
|
2009-11-16 10:12:15 +08:00
|
|
|
ei_add_test(permutationmatrices)
|
2009-12-17 00:37:21 +08:00
|
|
|
ei_add_test(eigen2support)
|
2010-01-20 18:51:59 +08:00
|
|
|
ei_add_test(nullary)
|
2010-02-09 21:07:37 +08:00
|
|
|
ei_add_test(nesting_ops "${CMAKE_CXX_FLAGS_DEBUG}")
|
2009-01-12 21:40:02 +08:00
|
|
|
|
2009-11-23 23:13:21 +08:00
|
|
|
ei_add_test(prec_inverse_4x4)
|
|
|
|
|
2010-04-29 20:04:42 +08:00
|
|
|
string(TOLOWER "${CMAKE_CXX_COMPILER}" cmake_cxx_compiler_tolower)
|
|
|
|
if(cmake_cxx_compiler_tolower MATCHES "qcc")
|
|
|
|
set(CXX_IS_QCC "ON")
|
|
|
|
endif()
|
|
|
|
|
2009-02-28 00:19:13 +08:00
|
|
|
ei_add_property(EIGEN_TESTING_SUMMARY "CXX: ${CMAKE_CXX_COMPILER}\n")
|
2010-04-29 20:04:42 +08:00
|
|
|
if(CMAKE_COMPILER_IS_GNUCXX AND NOT CXX_IS_QCC)
|
2009-01-12 21:40:02 +08:00
|
|
|
execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version COMMAND head -n 1 OUTPUT_VARIABLE EIGEN_CXX_VERSION_STRING OUTPUT_STRIP_TRAILING_WHITESPACE)
|
2009-02-28 00:19:13 +08:00
|
|
|
ei_add_property(EIGEN_TESTING_SUMMARY "CXX_VERSION: ${EIGEN_CXX_VERSION_STRING}\n")
|
2010-04-29 20:04:42 +08:00
|
|
|
endif()
|
2009-02-28 00:19:13 +08:00
|
|
|
ei_add_property(EIGEN_TESTING_SUMMARY "CXX_FLAGS: ${CMAKE_CXX_FLAGS}\n")
|
|
|
|
ei_add_property(EIGEN_TESTING_SUMMARY "Sparse lib flags: ${SPARSE_LIBS}\n")
|