CMakeLists.txt 1.5 KB
Newer Older
1
# Copyright 2010-2020, Olivier Stasse, Guilhem Saurel, JRL, CNRS/AIST, LAAS-CNRS
2 3 4

ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN)

Thomas Moulard's avatar
Thomas Moulard committed
5
ADD_DEFINITIONS(-DTESTS_DATADIR="${CMAKE_CURRENT_SOURCE_DIR}/data")
6
ADD_DEFINITIONS(-DTESTS_PLUGINDIR="${LIBRARY_OUTPUT_PATH}")
7
ADD_DEFINITIONS(-DTESTS_DYNLIBSUFFIX="${CMAKE_SHARED_LIBRARY_SUFFIX}")
Thomas Moulard's avatar
Thomas Moulard committed
8

9
MACRO(DYNAMIC_GRAPH_TEST NAME)
Guilhem Saurel's avatar
Guilhem Saurel committed
10
  ADD_UNIT_TEST(${NAME} ${NAME}.cpp)
11
  TARGET_LINK_LIBRARIES(${NAME} ${PROJECT_NAME} ${Boost_LIBRARIES})
12 13 14
ENDMACRO(DYNAMIC_GRAPH_TEST)

# Signal cast test.
15
SET(signalcast_libs signal-cast-registerer-libA signal-cast-registerer-libB)
16 17

FOREACH(lib ${signalcast_libs})
18
  ADD_LIBRARY(${lib} SHARED ${lib})
19 20
  TARGET_LINK_LIBRARIES(${lib} ${PROJECT_NAME})
ENDFOREACH()
21

22
DYNAMIC_GRAPH_TEST(signal-cast-registerer)
23 24

# Unit testing.
Francois Keith's avatar
Francois Keith committed
25 26 27
IF(NOT APPLE)
  DYNAMIC_GRAPH_TEST(entity)
ENDIF(NOT APPLE)
Thomas Moulard's avatar
Thomas Moulard committed
28
DYNAMIC_GRAPH_TEST(custom-entity)
29
DYNAMIC_GRAPH_TEST(factory)
30
DYNAMIC_GRAPH_TEST(pool)
Thomas Moulard's avatar
Thomas Moulard committed
31
DYNAMIC_GRAPH_TEST(signal-time-dependent)
Thomas Moulard's avatar
Thomas Moulard committed
32
DYNAMIC_GRAPH_TEST(value)
33
DYNAMIC_GRAPH_TEST(signal-ptr)
Joseph Mirabel's avatar
Joseph Mirabel committed
34
DYNAMIC_GRAPH_TEST(real-time-logger)
35
DYNAMIC_GRAPH_TEST(debug-trace)
36 37
DYNAMIC_GRAPH_TEST(debug-tracer)
TARGET_LINK_LIBRARIES(debug-tracer tracer)
38 39
DYNAMIC_GRAPH_TEST(debug-real-time-tracer)
TARGET_LINK_LIBRARIES(debug-real-time-tracer tracer-real-time tracer)
40
DYNAMIC_GRAPH_TEST(debug-logger)
41
DYNAMIC_GRAPH_TEST(debug-logger-winit)
Bergé's avatar
Bergé committed
42
DYNAMIC_GRAPH_TEST(signal-all)
Olivier Stasse's avatar
Olivier Stasse committed
43
DYNAMIC_GRAPH_TEST(command-test)
44
DYNAMIC_GRAPH_TEST(test-mt)
Olivier Stasse's avatar
Olivier Stasse committed
45
TARGET_LINK_LIBRARIES(test-mt tracer)
Olivier Stasse's avatar
Olivier Stasse committed
46
DYNAMIC_GRAPH_TEST(exceptions)