aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/CMakeLists.txt
blob: 4a5ca235cba68236a3088a4fecbd6ca0e4d538de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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
  determinant.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)