IF(BUILD_TESTS) OPTION(EIGEN_NO_ASSERTION_CHECKING "Disable checking of assertions" OFF) ENABLE_TESTING() FIND_PACKAGE(Qt4 REQUIRED) INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIR} ) SET(test_SRCS cholesky.cpp main.cpp # basicstuff.cpp # linearstructure.cpp # product.cpp # adjoint.cpp # submatrices.cpp # miscmatrices.cpp # smallvectors.cpp # map.cpp # cwiseop.cpp # determinant.cpp # triangular.cpp ) QT4_AUTOMOC(${test_SRCS}) ADD_EXECUTABLE(test ${test_SRCS}) TARGET_LINK_LIBRARIES(test ${QT_QTCORE_LIBRARY} ${QT_QTTEST_LIBRARY}) IF(NOT EIGEN_NO_ASSERTION_CHECKING) SET_TARGET_PROPERTIES(test PROPERTIES COMPILE_FLAGS "-fexceptions") OPTION(EIGEN_DEBUG_ASSERTS "Enable debuging of assertions" OFF) IF(EIGEN_DEBUG_ASSERTS) ADD_DEFINITIONS(-DEIGEN_DEBUG_ASSERTS=1) ENDIF(EIGEN_DEBUG_ASSERTS) ELSE(NOT EIGEN_NO_ASSERTION_CHECKING) ADD_DEFINITIONS(-DEIGEN_NO_ASSERTION_CHECKING=1) ENDIF(NOT EIGEN_NO_ASSERTION_CHECKING) ADD_TEST(Eigen test) ENDIF(BUILD_TESTS)