Verified Commit a93c5d5a authored by Justin Carpentier's avatar Justin Carpentier
Browse files

cmake: simplify test inclusion

parent ed4e3d73
......@@ -3,7 +3,8 @@ config_files(fcl_resources/config.h)
macro(add_fcl_template_test test_name)
add_executable(${ARGV})
target_link_libraries(${test_name}
${Boost_LIBRARIES}
PUBLIC
Boost::unit_test_framework
)
add_test(${test_name} ${EXECUTABLE_OUTPUT_PATH}/${test_name})
endmacro(add_fcl_template_test)
......@@ -12,8 +13,9 @@ macro(add_fcl_test test_name)
add_executable(${ARGV})
target_link_libraries(${test_name}
PUBLIC
hpp-fcl
${PROJECT_NAME}
${Boost_LIBRARIES}
Boost::unit_test_framework
utility
)
PKG_CONFIG_USE_DEPENDENCY(${test_name} assimp)
......@@ -27,7 +29,7 @@ IF(RUN_TESTS)
ELSE()
add_library(utility STATIC EXCLUDE_FROM_ALL utility.cpp)
ENDIF()
target_link_libraries(utility hpp-fcl)
target_link_libraries(utility PUBLIC ${PROJECT_NAME})
add_fcl_test(math math.cpp)
......@@ -61,7 +63,13 @@ endif(HPP_FCL_HAVE_OCTOMAP)
## Benchmark
add_executable(test-benchmark benchmark.cpp)
target_link_libraries(test-benchmark hpp-fcl ${Boost_LIBRARIES} utility)
target_link_libraries(test-benchmark
PUBLIC
utility
Boost::chrono
Boost::filesystem
${PROJECT_NAME}
)
## Python tests
IF(BUILD_PYTHON_INTERFACE)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment