| 12345678910111213141516171819202122232425262728 |
- set(Boost_USE_STATIC_LIBS OFF)
- find_package(Boost REQUIRED COMPONENTS unit_test_framework)
- include_directories(${Boost_INCLUDE_DIRS})
- file(GLOB_RECURSE TEST_CORE_SRC_FILES ./core/*.cpp)
- add_executable(test_core ${TEST_CORE_SRC_FILES} ${CORE_SRC_FILES})
- target_compile_definitions(test_core PUBLIC SOPHIAR_TEST)
- target_link_libraries(test_core ${Boost_LIBRARIES} ${BASIC_LIBS})
- file(GLOB_RECURSE TEST_UTILITY_SRC_FILES ./utility/*.cpp)
- add_executable(test_utility ${TEST_UTILITY_SRC_FILES} ${CORE_SRC_FILES})
- target_compile_definitions(test_utility PUBLIC SOPHIAR_TEST)
- target_link_libraries(test_utility ${Boost_LIBRARIES} ${BASIC_LIBS})
- file(GLOB_RECURSE TEST_ALGORITHM_SRC_FILES ./algorithm/*.cpp)
- add_executable(test_algorithm ${TEST_ALGORITHM_SRC_FILES} ${CORE_SRC_FILES} ${UTILITY_SRC_FILES})
- target_compile_definitions(test_algorithm PUBLIC SOPHIAR_TEST SOPHIAR_TEST_ALGORITHM)
- target_link_libraries(test_algorithm ${Boost_LIBRARIES} ${BASIC_LIBS} sophiar_algorithm)
- file(GLOB_RECURSE TEST_ROBOT_SRC_FILES ./robot/*.cpp)
- add_executable(test_robot ${TEST_ROBOT_SRC_FILES} ${CORE_SRC_FILES})
- target_compile_definitions(test_robot PUBLIC SOPHIAR_TEST SOPHIAR_TEST_ROBOT)
- target_link_libraries(test_robot ${Boost_LIBRARIES} ${BASIC_LIBS} sophiar_robot)
- file(GLOB_RECURSE TEST_SENSOR_SRC_FILES ./sensor/*.cpp)
- add_executable(test_sensor ${TEST_SENSOR_SRC_FILES} ${CORE_SRC_FILES})
- target_compile_definitions(test_sensor PUBLIC SOPHIAR_TEST SOPHIAR_TEST_SENSOR)
- target_link_libraries(test_sensor ${Boost_LIBRARIES} ${BASIC_LIBS} sophiar_sensor)
|