Skip to content
Snippets Groups Projects
Commit a7bea5b9 authored by Thomas Moulard's avatar Thomas Moulard
Browse files

Link against Boost unit test framework.

parent 3b98a28d
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,7 @@ PKG_CONFIG_APPEND_LIBS("sot-core")
# Search for dependencies.
# Boost
SET(BOOST_COMPONENTS thread filesystem)
SET(BOOST_COMPONENTS thread filesystem unit_test_framework)
SEARCH_FOR_BOOST()
ADD_REQUIRED_DEPENDENCY("jrl-mal >= 1.8.0")
......
......@@ -27,6 +27,9 @@ IF(UNIX)
ADD_DEFINITIONS(-pthread)
ENDIF(UNIX)
# Make Boost.Test generates the main function in test cases.
ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN)
# The sot-core plugin libraries that tests have to be linked against
# the name of the variable for test EXECUTABLE_NAME is
# TEST_${EXECUTABLE_NAME}_LIBS
......@@ -119,6 +122,9 @@ FOREACH(test ${tests})
PKG_CONFIG_USE_DEPENDENCY(${EXECUTABLE_NAME} jrl-mal)
PKG_CONFIG_USE_DEPENDENCY(${EXECUTABLE_NAME} dynamic-graph)
# Link against Boost.
TARGET_LINK_LIBRARIES(${EXECUTABLE_NAME} ${Boost_LIBRARIES})
ADD_TEST(${test} ${EXECUTABLE_NAME})
IF (UNIX)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment