diff --git a/CMakeLists.txt b/CMakeLists.txt index d31b645d..9596b145 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,6 +50,8 @@ find_package(Boost REQUIRED system thread unit_test_framework) include_directories(${Boost_INCLUDE_DIR}) link_directories(${Boost_LIBRARY_DIRS}) +enable_testing() + add_subdirectory(urdf_parser) set(PKG_NAME ${PROJECT_NAME}) diff --git a/urdf_parser/CMakeLists.txt b/urdf_parser/CMakeLists.txt index 0e91d7b0..1058d220 100644 --- a/urdf_parser/CMakeLists.txt +++ b/urdf_parser/CMakeLists.txt @@ -24,11 +24,14 @@ target_link_libraries(check_urdf urdfdom_model urdfdom_world) add_executable(urdf_to_graphiz src/urdf_to_graphiz.cpp) target_link_libraries(urdf_to_graphiz urdfdom_model) +# urdf_mem_test is a binary for testing, not a unit test add_executable(urdf_mem_test test/memtest.cpp) target_link_libraries(urdf_mem_test urdfdom_model) +# unit test to fix geometry problems add_executable(urdf_unit_test test/urdf_unit_test.cpp) target_link_libraries(urdf_unit_test urdfdom_model ${Boost_LIBRARIES}) +add_test(urdf_unit_test urdf_unit_test) INSTALL(TARGETS urdfdom_model DESTINATION ${CMAKE_INSTALL_LIBDIR}) INSTALL(TARGETS urdfdom_world DESTINATION ${CMAKE_INSTALL_LIBDIR})