Skip to content

Commit

Permalink
Simplify CMakeLists
Browse files Browse the repository at this point in the history
  • Loading branch information
rjoomen committed Dec 4, 2024
1 parent 127ae6d commit 2bff258
Showing 1 changed file with 21 additions and 57 deletions.
78 changes: 21 additions & 57 deletions tesseract_motion_planners/simple/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,60 +1,24 @@
find_package(tesseract_command_language REQUIRED)

# SimplePlanner Tests
add_executable(${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_plan_unit
simple_planner_fixed_size_assign_no_ik_plan_unit.cpp)
target_link_libraries(${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_plan_unit PRIVATE GTest::GTest GTest::Main
${PROJECT_NAME}_simple)
target_compile_options(${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_plan_unit
PRIVATE ${TESSERACT_COMPILE_OPTIONS_PRIVATE} ${TESSERACT_COMPILE_OPTIONS_PUBLIC})
target_compile_definitions(${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_plan_unit
PRIVATE ${TESSERACT_COMPILE_DEFINITIONS})
target_clang_tidy(${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_plan_unit
ENABLE ${TESSERACT_ENABLE_CLANG_TIDY})
target_cxx_version(${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_plan_unit PRIVATE
VERSION ${TESSERACT_CXX_VERSION})
target_code_coverage(
${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_plan_unit
PRIVATE
ALL
EXCLUDE ${COVERAGE_EXCLUDE}
ENABLE ${TESSERACT_ENABLE_CODE_COVERAGE})
add_gtest_discover_tests(${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_plan_unit)
add_dependencies(${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_plan_unit ${PROJECT_NAME}_simple)
add_dependencies(run_tests ${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_plan_unit)
macro(add_gtest test_name test_file)
add_executable(${test_name} ${test_file})
target_link_libraries(${test_name} PRIVATE GTest::GTest GTest::Main ${PROJECT_NAME}_simple)
target_compile_options(${test_name} PRIVATE ${TESSERACT_COMPILE_OPTIONS_PRIVATE} ${TESSERACT_COMPILE_OPTIONS_PUBLIC})
target_compile_definitions(${test_name} PRIVATE ${TESSERACT_COMPILE_DEFINITIONS})
target_clang_tidy(${test_name} ENABLE ${TESSERACT_ENABLE_CLANG_TIDY})
target_cxx_version(${test_name} PRIVATE VERSION ${TESSERACT_CXX_VERSION})
target_code_coverage(
${test_name}
PRIVATE
ALL
EXCLUDE ${COVERAGE_EXCLUDE}
ENABLE ${TESSERACT_ENABLE_CODE_COVERAGE})
add_gtest_discover_tests(${test_name})
add_dependencies(${test_name} ${PROJECT_NAME}_simple)
add_dependencies(run_tests ${test_name})
endmacro()

add_executable(${PROJECT_NAME}_simple_planner_fixed_size_plan_unit simple_planner_fixed_size_plan_unit.cpp)
target_link_libraries(${PROJECT_NAME}_simple_planner_fixed_size_plan_unit PRIVATE GTest::GTest GTest::Main
${PROJECT_NAME}_simple)
target_compile_options(${PROJECT_NAME}_simple_planner_fixed_size_plan_unit PRIVATE ${TESSERACT_COMPILE_OPTIONS_PRIVATE}
${TESSERACT_COMPILE_OPTIONS_PUBLIC})
target_compile_definitions(${PROJECT_NAME}_simple_planner_fixed_size_plan_unit PRIVATE ${TESSERACT_COMPILE_DEFINITIONS})
target_clang_tidy(${PROJECT_NAME}_simple_planner_fixed_size_plan_unit ENABLE ${TESSERACT_ENABLE_CLANG_TIDY})
target_cxx_version(${PROJECT_NAME}_simple_planner_fixed_size_plan_unit PRIVATE VERSION ${TESSERACT_CXX_VERSION})
target_code_coverage(
${PROJECT_NAME}_simple_planner_fixed_size_plan_unit
PRIVATE
ALL
EXCLUDE ${COVERAGE_EXCLUDE}
ENABLE ${TESSERACT_ENABLE_CODE_COVERAGE})
add_gtest_discover_tests(${PROJECT_NAME}_simple_planner_fixed_size_plan_unit)
add_dependencies(${PROJECT_NAME}_simple_planner_fixed_size_plan_unit ${PROJECT_NAME}_simple)
add_dependencies(run_tests ${PROJECT_NAME}_simple_planner_fixed_size_plan_unit)

add_executable(${PROJECT_NAME}_simple_planner_lvs_plan_unit simple_planner_lvs_plan_unit.cpp)
target_link_libraries(${PROJECT_NAME}_simple_planner_lvs_plan_unit PRIVATE GTest::GTest GTest::Main
${PROJECT_NAME}_simple)
target_compile_options(${PROJECT_NAME}_simple_planner_lvs_plan_unit PRIVATE ${TESSERACT_COMPILE_OPTIONS_PRIVATE}
${TESSERACT_COMPILE_OPTIONS_PUBLIC})
target_compile_definitions(${PROJECT_NAME}_simple_planner_lvs_plan_unit PRIVATE ${TESSERACT_COMPILE_DEFINITIONS})
target_clang_tidy(${PROJECT_NAME}_simple_planner_lvs_plan_unit ENABLE ${TESSERACT_ENABLE_CLANG_TIDY})
target_cxx_version(${PROJECT_NAME}_simple_planner_lvs_plan_unit PRIVATE VERSION ${TESSERACT_CXX_VERSION})
target_code_coverage(
${PROJECT_NAME}_simple_planner_lvs_plan_unit
PRIVATE
ALL
EXCLUDE ${COVERAGE_EXCLUDE}
ENABLE ${TESSERACT_ENABLE_CODE_COVERAGE})
add_gtest_discover_tests(${PROJECT_NAME}_simple_planner_lvs_plan_unit)
add_dependencies(${PROJECT_NAME}_simple_planner_lvs_plan_unit ${PROJECT_NAME}_simple)
add_dependencies(run_tests ${PROJECT_NAME}_simple_planner_lvs_plan_unit)
add_gtest(${PROJECT_NAME}_simple_planner_fixed_size_assign_no_ik_plan_unit
simple_planner_fixed_size_assign_no_ik_plan_unit.cpp)
add_gtest(${PROJECT_NAME}_simple_planner_fixed_size_plan_unit simple_planner_fixed_size_plan_unit.cpp)
add_gtest(${PROJECT_NAME}_simple_planner_lvs_plan_unit simple_planner_lvs_plan_unit.cpp)

0 comments on commit 2bff258

Please sign in to comment.