eigen/test/CMakeLists.txt
Gael Guennebaud 721626dfc5 * Added support for a comma initializer: mat.block(i,j,2,2) << 1, 2, 3, 4;
If the number of coefficients does not match the matrix size, then an assertion is raised.
  No support for xpr on the right side for the moment.

* Added support for assertion checking. This allows to test that an assertion is indeed raised
  when it should be.

* Fixed a mistake in the CwiseUnary example.
2008-03-08 19:02:24 +00:00

42 lines
928 B
CMake

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
main.cpp
basicstuff.cpp
linearstructure.cpp
product.cpp
adjoint.cpp
submatrices.cpp
miscmatrices.cpp
smallvectors.cpp
map.cpp
cwiseop.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)