mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-27 07:29:52 +08:00
721626dfc5
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.
42 lines
928 B
CMake
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)
|