2013-07-31 22:16:08 +08:00
|
|
|
# generate split test header file only if it does not yet exist
|
|
|
|
# in order to prevent a rebuild everytime cmake is configured
|
|
|
|
if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/split_test_helper.h)
|
|
|
|
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/split_test_helper.h "")
|
|
|
|
foreach(i RANGE 1 999)
|
|
|
|
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/split_test_helper.h
|
|
|
|
"#ifdef EIGEN_TEST_PART_${i}\n"
|
|
|
|
"#define CALL_SUBTEST_${i}(FUNC) CALL_SUBTEST(FUNC)\n"
|
|
|
|
"#else\n"
|
|
|
|
"#define CALL_SUBTEST_${i}(FUNC)\n"
|
|
|
|
"#endif\n\n"
|
2011-03-28 23:39:05 +08:00
|
|
|
)
|
2013-07-31 22:16:08 +08:00
|
|
|
endforeach()
|
|
|
|
endif()
|
2011-03-28 23:39:05 +08:00
|
|
|
|
2014-03-13 04:33:45 +08:00
|
|
|
# check if we have a Fortran compiler
|
|
|
|
include("../cmake/language_support.cmake")
|
|
|
|
|
|
|
|
workaround_9220(Fortran EIGEN_Fortran_COMPILER_WORKS)
|
|
|
|
|
|
|
|
if(EIGEN_Fortran_COMPILER_WORKS)
|
|
|
|
enable_language(Fortran OPTIONAL)
|
|
|
|
if(NOT CMAKE_Fortran_COMPILER)
|
|
|
|
set(EIGEN_Fortran_COMPILER_WORKS OFF)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(NOT EIGEN_Fortran_COMPILER_WORKS)
|
|
|
|
# search for a default Lapack library to complete Eigen's one
|
|
|
|
find_package(LAPACK)
|
|
|
|
endif()
|
|
|
|
|
2011-11-12 21:11:27 +08:00
|
|
|
# configure blas/lapack (use Eigen's ones)
|
2014-03-13 04:33:45 +08:00
|
|
|
set(EIGEN_BLAS_LIBRARIES eigen_blas)
|
|
|
|
set(EIGEN_LAPACK_LIBRARIES eigen_lapack)
|
2011-11-12 21:11:27 +08:00
|
|
|
|
2012-06-08 00:31:09 +08:00
|
|
|
set(EIGEN_TEST_MATRIX_DIR "" CACHE STRING "Enable testing of realword sparse matrices contained in the specified path")
|
|
|
|
if(EIGEN_TEST_MATRIX_DIR)
|
2012-03-29 20:32:54 +08:00
|
|
|
if(NOT WIN32)
|
2012-06-08 00:31:09 +08:00
|
|
|
message(STATUS "Test realworld sparse matrices: ${EIGEN_TEST_MATRIX_DIR}")
|
|
|
|
add_definitions( -DTEST_REAL_CASES="${EIGEN_TEST_MATRIX_DIR}" )
|
2012-03-29 20:32:54 +08:00
|
|
|
else(NOT WIN32)
|
2012-06-08 00:31:09 +08:00
|
|
|
message(STATUS "REAL CASES CAN NOT BE CURRENTLY TESTED ON WIN32")
|
2012-03-29 20:32:54 +08:00
|
|
|
endif(NOT WIN32)
|
2012-06-08 00:31:09 +08:00
|
|
|
endif(EIGEN_TEST_MATRIX_DIR)
|
2012-03-29 20:32:54 +08:00
|
|
|
|
2011-11-12 21:11:27 +08:00
|
|
|
set(SPARSE_LIBS " ")
|
|
|
|
|
|
|
|
find_package(Cholmod)
|
2014-03-13 04:33:45 +08:00
|
|
|
if(CHOLMOD_FOUND)
|
2011-11-12 21:11:27 +08:00
|
|
|
add_definitions("-DEIGEN_CHOLMOD_SUPPORT")
|
|
|
|
include_directories(${CHOLMOD_INCLUDES})
|
2014-03-13 04:33:45 +08:00
|
|
|
set(SPARSE_LIBS ${SPARSE_LIBS} ${CHOLMOD_LIBRARIES} ${EIGEN_BLAS_LIBRARIES} ${EIGEN_LAPACK_LIBRARIES})
|
|
|
|
set(CHOLMOD_ALL_LIBS ${CHOLMOD_LIBRARIES} ${EIGEN_BLAS_LIBRARIES} ${EIGEN_LAPACK_LIBRARIES})
|
2011-11-12 21:11:27 +08:00
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "Cholmod, ")
|
|
|
|
else()
|
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "Cholmod, ")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
find_package(Umfpack)
|
2014-03-13 04:33:45 +08:00
|
|
|
if(UMFPACK_FOUND)
|
2011-11-12 21:11:27 +08:00
|
|
|
add_definitions("-DEIGEN_UMFPACK_SUPPORT")
|
|
|
|
include_directories(${UMFPACK_INCLUDES})
|
2014-03-13 04:33:45 +08:00
|
|
|
set(SPARSE_LIBS ${SPARSE_LIBS} ${UMFPACK_LIBRARIES} ${EIGEN_BLAS_LIBRARIES})
|
|
|
|
set(UMFPACK_ALL_LIBS ${UMFPACK_LIBRARIES} ${EIGEN_BLAS_LIBRARIES})
|
2011-11-12 21:11:27 +08:00
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "UmfPack, ")
|
|
|
|
else()
|
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "UmfPack, ")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
find_package(SuperLU)
|
2014-03-13 04:33:45 +08:00
|
|
|
if(SUPERLU_FOUND)
|
2011-11-12 21:11:27 +08:00
|
|
|
add_definitions("-DEIGEN_SUPERLU_SUPPORT")
|
|
|
|
include_directories(${SUPERLU_INCLUDES})
|
2014-03-13 04:33:45 +08:00
|
|
|
set(SPARSE_LIBS ${SPARSE_LIBS} ${SUPERLU_LIBRARIES} ${EIGEN_BLAS_LIBRARIES})
|
|
|
|
set(SUPERLU_ALL_LIBS ${SUPERLU_LIBRARIES} ${EIGEN_BLAS_LIBRARIES})
|
2011-11-12 21:11:27 +08:00
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "SuperLU, ")
|
|
|
|
else()
|
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "SuperLU, ")
|
|
|
|
endif()
|
|
|
|
|
2012-03-09 01:59:08 +08:00
|
|
|
|
|
|
|
find_package(Pastix)
|
|
|
|
find_package(Scotch)
|
2014-07-09 22:54:15 +08:00
|
|
|
find_package(Metis 5.0 REQUIRED)
|
2014-03-13 04:33:45 +08:00
|
|
|
if(PASTIX_FOUND)
|
2012-03-09 01:59:08 +08:00
|
|
|
add_definitions("-DEIGEN_PASTIX_SUPPORT")
|
|
|
|
include_directories(${PASTIX_INCLUDES})
|
|
|
|
if(SCOTCH_FOUND)
|
|
|
|
include_directories(${SCOTCH_INCLUDES})
|
|
|
|
set(PASTIX_LIBRARIES ${PASTIX_LIBRARIES} ${SCOTCH_LIBRARIES})
|
|
|
|
elseif(METIS_FOUND)
|
|
|
|
include_directories(${METIS_INCLUDES})
|
|
|
|
set(PASTIX_LIBRARIES ${PASTIX_LIBRARIES} ${METIS_LIBRARIES})
|
|
|
|
else(SCOTCH_FOUND)
|
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "PaStiX, ")
|
|
|
|
endif(SCOTCH_FOUND)
|
2014-03-13 04:33:45 +08:00
|
|
|
set(SPARSE_LIBS ${SPARSE_LIBS} ${PASTIX_LIBRARIES} ${ORDERING_LIBRARIES} ${EIGEN_BLAS_LIBRARIES})
|
|
|
|
set(PASTIX_ALL_LIBS ${PASTIX_LIBRARIES} ${EIGEN_BLAS_LIBRARIES})
|
2012-03-09 01:59:08 +08:00
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "PaStiX, ")
|
|
|
|
else()
|
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "PaStiX, ")
|
|
|
|
endif()
|
|
|
|
|
2013-01-21 22:36:18 +08:00
|
|
|
if(METIS_FOUND)
|
|
|
|
add_definitions("-DEIGEN_METIS_SUPPORT")
|
|
|
|
include_directories(${METIS_INCLUDES})
|
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "METIS, ")
|
|
|
|
else()
|
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "METIS, ")
|
|
|
|
endif()
|
|
|
|
|
2012-11-12 22:20:37 +08:00
|
|
|
find_package(SPQR)
|
2014-03-13 04:33:45 +08:00
|
|
|
if(SPQR_FOUND AND CHOLMOD_FOUND AND (EIGEN_Fortran_COMPILER_WORKS OR LAPACK_FOUND) )
|
|
|
|
add_definitions("-DEIGEN_SPQR_SUPPORT")
|
|
|
|
include_directories(${SPQR_INCLUDES})
|
|
|
|
set(SPQR_ALL_LIBS ${SPQR_LIBRARIES} ${CHOLMOD_LIBRARIES} ${EIGEN_LAPACK_LIBRARIES} ${EIGEN_BLAS_LIBRARIES} ${LAPACK_LIBRARIES})
|
|
|
|
set(SPARSE_LIBS ${SPARSE_LIBS} ${SPQR_ALL_LIBS})
|
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "SPQR, ")
|
|
|
|
else()
|
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "SPQR, ")
|
2012-11-12 22:20:37 +08:00
|
|
|
endif()
|
|
|
|
|
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)
|
2011-01-14 21:30:06 +08:00
|
|
|
if(QT4_FOUND)
|
|
|
|
include(${QT_USE_FILE})
|
|
|
|
ei_add_property(EIGEN_TESTED_BACKENDS "Qt4 support, ")
|
|
|
|
else()
|
|
|
|
ei_add_property(EIGEN_MISSING_BACKENDS "Qt4 support, ")
|
|
|
|
endif()
|
2009-01-23 17:50:16 +08:00
|
|
|
endif(NOT EIGEN_TEST_NOQT)
|
2009-01-23 21:17:57 +08:00
|
|
|
|
2008-10-20 18:43:11 +08:00
|
|
|
if(TEST_LIB)
|
|
|
|
add_definitions("-DEIGEN_EXTERN_INSTANTIATIONS=1")
|
|
|
|
endif(TEST_LIB)
|
|
|
|
|
2013-03-20 15:40:13 +08:00
|
|
|
set_property(GLOBAL PROPERTY EIGEN_CURRENT_SUBPROJECT "Official")
|
|
|
|
add_custom_target(BuildOfficial)
|
|
|
|
|
2013-11-07 23:38:14 +08:00
|
|
|
option(EIGEN_TEST_EVALUATORS "Enable work in progress evaluators" OFF)
|
2013-11-08 01:48:17 +08:00
|
|
|
if(EIGEN_TEST_EVALUATORS)
|
2013-11-07 23:38:14 +08:00
|
|
|
add_definitions("-DEIGEN_TEST_EVALUATORS=1")
|
|
|
|
add_definitions("-DEIGEN_ENABLE_EVALUATORS=1")
|
|
|
|
endif(EIGEN_TEST_EVALUATORS)
|
|
|
|
|
2008-10-20 18:43:11 +08:00
|
|
|
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)
|
2009-11-20 22:39:38 +08:00
|
|
|
ei_add_test(unalignedcount)
|
2011-05-23 20:20:49 +08:00
|
|
|
ei_add_test(exceptions)
|
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)
|
2013-07-11 05:26:35 +08:00
|
|
|
ei_add_test(mapped_matrix)
|
2010-02-27 09:12:51 +08:00
|
|
|
ei_add_test(mapstride)
|
2011-02-03 23:05:45 +08:00
|
|
|
ei_add_test(mapstaticmethods)
|
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)
|
2013-02-26 22:10:00 +08:00
|
|
|
ei_add_test(ref)
|
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)
|
2010-11-11 01:58:55 +08:00
|
|
|
ei_add_test(product_mmtr)
|
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)
|
2011-12-02 01:17:19 +08:00
|
|
|
ei_add_test(cholesky)
|
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)
|
2011-12-02 01:17:19 +08:00
|
|
|
ei_add_test(eigensolver_selfadjoint)
|
|
|
|
ei_add_test(eigensolver_generic)
|
2009-09-01 22:20:56 +08:00
|
|
|
ei_add_test(eigensolver_complex)
|
2012-07-27 02:15:17 +08:00
|
|
|
ei_add_test(real_qz)
|
|
|
|
ei_add_test(eigensolver_generalized_real)
|
2010-10-12 21:12:36 +08:00
|
|
|
ei_add_test(jacobi)
|
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)
|
2010-10-16 16:45:30 +08:00
|
|
|
ei_add_test(stddeque)
|
2009-02-03 09:43:59 +08:00
|
|
|
ei_add_test(resize)
|
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)
|
2011-11-12 21:11:27 +08:00
|
|
|
ei_add_test(sparse_solvers)
|
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)
|
2011-10-11 19:45:27 +08:00
|
|
|
ei_add_test(sparse_permutations)
|
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}")
|
2011-02-01 20:46:02 +08:00
|
|
|
ei_add_test(zerosized)
|
2011-03-10 22:44:59 +08:00
|
|
|
ei_add_test(dontalign)
|
2012-06-22 15:39:35 +08:00
|
|
|
ei_add_test(evaluators)
|
2011-10-17 04:12:19 +08:00
|
|
|
ei_add_test(sizeoverflow)
|
2009-11-23 23:13:21 +08:00
|
|
|
ei_add_test(prec_inverse_4x4)
|
2011-11-19 00:10:27 +08:00
|
|
|
ei_add_test(vectorwiseop)
|
2013-04-16 21:10:40 +08:00
|
|
|
ei_add_test(special_numbers)
|
2013-08-03 01:59:43 +08:00
|
|
|
ei_add_test(rvalue_types)
|
2013-08-11 01:13:46 +08:00
|
|
|
ei_add_test(dense_storage)
|
2011-03-23 18:54:00 +08:00
|
|
|
|
2011-11-12 21:11:27 +08:00
|
|
|
ei_add_test(simplicial_cholesky)
|
|
|
|
ei_add_test(conjugate_gradient)
|
|
|
|
ei_add_test(bicgstab)
|
2012-08-03 19:05:45 +08:00
|
|
|
ei_add_test(sparselu)
|
2013-01-12 00:16:14 +08:00
|
|
|
ei_add_test(sparseqr)
|
2012-03-09 01:59:08 +08:00
|
|
|
|
2012-12-07 22:48:21 +08:00
|
|
|
# ei_add_test(denseLM)
|
|
|
|
|
2013-03-20 15:40:13 +08:00
|
|
|
if(QT4_FOUND)
|
|
|
|
ei_add_test(qtvector "" "${QT_QTCORE_LIBRARY}")
|
|
|
|
endif(QT4_FOUND)
|
|
|
|
|
2011-11-12 21:11:27 +08:00
|
|
|
if(UMFPACK_FOUND)
|
2011-12-11 02:32:17 +08:00
|
|
|
ei_add_test(umfpack_support "" "${UMFPACK_ALL_LIBS}")
|
2011-11-12 21:11:27 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(SUPERLU_FOUND)
|
2011-12-11 02:32:17 +08:00
|
|
|
ei_add_test(superlu_support "" "${SUPERLU_ALL_LIBS}")
|
2011-11-12 21:11:27 +08:00
|
|
|
endif()
|
|
|
|
|
2011-12-11 02:32:17 +08:00
|
|
|
if(CHOLMOD_FOUND)
|
|
|
|
ei_add_test(cholmod_support "" "${CHOLMOD_ALL_LIBS}")
|
|
|
|
endif()
|
2011-11-12 21:11:27 +08:00
|
|
|
|
2011-12-11 02:32:17 +08:00
|
|
|
if(PARDISO_FOUND)
|
|
|
|
ei_add_test(pardiso_support "" "${PARDISO_ALL_LIBS}")
|
|
|
|
endif()
|
2011-11-12 21:11:27 +08:00
|
|
|
|
2012-03-09 01:59:08 +08:00
|
|
|
if(PASTIX_FOUND AND (SCOTCH_FOUND OR METIS_FOUND))
|
|
|
|
ei_add_test(pastix_support "" "${PASTIX_ALL_LIBS}")
|
|
|
|
endif()
|
|
|
|
|
2012-11-12 22:20:37 +08:00
|
|
|
if(SPQR_FOUND AND CHOLMOD_FOUND)
|
|
|
|
ei_add_test(spqr_support "" "${SPQR_ALL_LIBS}")
|
|
|
|
endif()
|
|
|
|
|
2013-01-21 22:36:18 +08:00
|
|
|
if(METIS_FOUND)
|
|
|
|
ei_add_test(metis_support "" "${METIS_LIBRARIES}")
|
|
|
|
endif()
|
2012-12-07 22:48:21 +08:00
|
|
|
|
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")
|
2011-01-19 23:10:54 +08:00
|
|
|
|
|
|
|
option(EIGEN_TEST_EIGEN2 "Run whole Eigen2 test suite against EIGEN2_SUPPORT" OFF)
|
2014-07-09 22:54:15 +08:00
|
|
|
mark_as_advanced(EIGEN_TEST_EIGEN2)
|
2011-01-19 23:10:54 +08:00
|
|
|
if(EIGEN_TEST_EIGEN2)
|
2014-07-01 22:58:11 +08:00
|
|
|
message(WARNING "The Eigen2 test suite has been removed")
|
2011-01-19 23:10:54 +08:00
|
|
|
endif()
|
2013-11-05 22:41:45 +08:00
|
|
|
|
|
|
|
|
|
|
|
# NVCC unit tests
|
|
|
|
option(EIGEN_TEST_NVCC "Enable NVCC support in unit tests" OFF)
|
|
|
|
if(EIGEN_TEST_NVCC)
|
|
|
|
|
|
|
|
find_package(CUDA)
|
|
|
|
if(CUDA_FOUND)
|
|
|
|
|
|
|
|
set(CUDA_PROPAGATE_HOST_FLAGS OFF)
|
2014-04-13 14:39:37 +08:00
|
|
|
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
|
|
|
set(CUDA_NVCC_FLAGS "-ccbin /usr/bin/clang" CACHE STRING "nvcc flags" FORCE)
|
|
|
|
endif()
|
2013-11-05 22:41:45 +08:00
|
|
|
cuda_include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
set(EIGEN_ADD_TEST_FILENAME_EXTENSION "cu")
|
|
|
|
|
|
|
|
ei_add_test(cuda_basic)
|
|
|
|
|
|
|
|
unset(EIGEN_ADD_TEST_FILENAME_EXTENSION)
|
|
|
|
|
|
|
|
endif(CUDA_FOUND)
|
|
|
|
|
|
|
|
endif(EIGEN_TEST_NVCC)
|
|
|
|
|