CMakeLists.txt 1.54 KB
Newer Older
1
# Copyright 2010-2020, Olivier Stasse, Guilhem Saurel, JRL, CNRS/AIST, LAAS-CNRS
Thomas Moulard's avatar
Thomas Moulard committed
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

Thomas Moulard's avatar
Thomas Moulard committed
9
MACRO(DYNAMIC_GRAPH_TEST NAME)
Guilhem Saurel's avatar
v4.0.0    
Guilhem Saurel committed
10
  ADD_UNIT_TEST(${NAME} ${NAME}.cpp)
11
  TARGET_LINK_LIBRARIES(${NAME} PRIVATE ${PROJECT_NAME} Boost::unit_test_framework)
Thomas Moulard's avatar
Thomas Moulard committed
12
13
14
ENDMACRO(DYNAMIC_GRAPH_TEST)

# Signal cast test.
15
SET(signalcast_libs signal-cast-registerer-libA signal-cast-registerer-libB)
Thomas Moulard's avatar
Thomas Moulard committed
16
17

FOREACH(lib ${signalcast_libs})
18
  ADD_LIBRARY(${lib} SHARED ${lib})
Guilhem Saurel's avatar
Guilhem Saurel committed
19
  TARGET_LINK_LIBRARIES(${lib} PRIVATE ${PROJECT_NAME})
Thomas Moulard's avatar
Thomas Moulard committed
20
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)
Olivier Stasse's avatar
Olivier Stasse committed
36
DYNAMIC_GRAPH_TEST(debug-tracer)
Guilhem Saurel's avatar
Guilhem Saurel committed
37
TARGET_LINK_LIBRARIES(debug-tracer PRIVATE tracer)
38
DYNAMIC_GRAPH_TEST(debug-real-time-tracer)
Guilhem Saurel's avatar
Guilhem Saurel committed
39
TARGET_LINK_LIBRARIES(debug-real-time-tracer PRIVATE tracer-real-time tracer)
Olivier Stasse's avatar
Olivier Stasse committed
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)
Guilhem Saurel's avatar
Guilhem Saurel committed
45
TARGET_LINK_LIBRARIES(test-mt PRIVATE tracer)
Olivier Stasse's avatar
Olivier Stasse committed
46
DYNAMIC_GRAPH_TEST(exceptions)