CMakeLists.txt 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. set (Boost_USE_STATIC_LIBS OFF)
  2. find_package (Boost REQUIRED COMPONENTS unit_test_framework)
  3. include_directories (${Boost_INCLUDE_DIRS})
  4. file(GLOB_RECURSE TEST_CORE_SRC_FILES ./core/*.cpp)
  5. add_executable(test_core
  6. ${TEST_CORE_SRC_FILES}
  7. ${CORE_IMPL_FILES})
  8. target_compile_definitions(test_core PUBLIC SOPHIAR_TEST)
  9. #target_compile_definitions(test_core PUBLIC CORO_SIGNAL2_USE_TIMER)
  10. target_link_libraries(test_core ${Boost_LIBRARIES} ${EXTRA_LIBS})
  11. file(GLOB_RECURSE TEST_UTILITY_SRC_FILES ./utility/*.cpp)
  12. add_executable(test_utility
  13. ${TEST_UTILITY_SRC_FILES}
  14. ${CORE_IMPL_FILES})
  15. target_compile_definitions(test_utility PUBLIC SOPHIAR_TEST)
  16. target_compile_definitions(test_utility PUBLIC CORO_SIGNAL2_USE_TIMER)
  17. target_link_libraries(test_utility ${Boost_LIBRARIES} ${EXTRA_LIBS})
  18. file(GLOB_RECURSE TEST_ALGORITHM_SRC_FILES ./algorithm/*.cpp)
  19. add_executable(test_algorithm
  20. ${TEST_ALGORITHM_SRC_FILES}
  21. ${ALGORITHM_IMPL_FILES}
  22. # ${ALGORITHM_IMPL_FILES}
  23. ${CORE_IMPL_FILES})
  24. target_compile_definitions(test_algorithm PUBLIC SOPHIAR_TEST SOPHIAR_TEST_ALGORITHM)
  25. target_compile_definitions(test_algorithm PUBLIC CORO_SIGNAL2_USE_TIMER)
  26. target_link_libraries(test_algorithm ${Boost_LIBRARIES} ${EXTRA_LIBS})
  27. file(GLOB_RECURSE TEST_ROBOT_SRC_FILES ./robot/*.cpp)
  28. add_executable(test_robot
  29. ${TEST_ROBOT_SRC_FILES}
  30. ${ROBOT_IMPL_FILES}
  31. ${CORE_IMPL_FILES})
  32. target_compile_definitions(test_robot PUBLIC SOPHIAR_TEST SOPHIAR_TEST_ROBOT)
  33. target_compile_definitions(test_robot PUBLIC CORO_SIGNAL2_USE_TIMER)
  34. target_link_libraries(test_robot ${Boost_LIBRARIES} ${EXTRA_LIBS})
  35. file(GLOB_RECURSE TEST_NDI_SRC_FILES ./tracker/ndi*.cpp)
  36. add_executable(test_ndi
  37. ${TEST_NDI_SRC_FILES}
  38. ../src/tracker/ndi/ndi_interface.cpp
  39. ${ALGORITHM_IMPL_FILES}
  40. ${CORE_IMPL_FILES})
  41. target_compile_definitions(test_ndi PUBLIC SOPHIAR_TEST SOPHIAR_TEST_NDI SOPHIAR_TEST_ALGORITHM)
  42. #target_compile_definitions(test_ndi PUBLIC CORO_SIGNAL2_USE_TIMER)
  43. target_link_libraries(test_ndi ${Boost_LIBRARIES} ${EXTRA_LIBS})
  44. file(GLOB_RECURSE TEST_SENSOR_SRC_FILES ./sensor/*.cpp)
  45. add_executable(test_sensor
  46. ${TEST_SENSOR_SRC_FILES}
  47. ../src/sensor/optoforce/optoforce_daq.cpp
  48. ${CORE_IMPL_FILES})
  49. target_compile_definitions(test_sensor PUBLIC SOPHIAR_TEST SOPHIAR_TEST_SENSOR)
  50. #target_compile_definitions(test_ndi PUBLIC CORO_SIGNAL2_USE_TIMER)
  51. target_link_libraries(test_sensor ${Boost_LIBRARIES} ${EXTRA_LIBS})