Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplifying CMakelists to use the standard test suite. #29

Merged
2 commits merged into from
Sep 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions src/control/nav2_dwa_controller/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,8 @@ install(DIRECTORY include/
)

if(BUILD_TESTING)
find_package(ament_cmake_cppcheck REQUIRED)
find_package(ament_cmake_cpplint REQUIRED)
find_package(ament_cmake_lint_cmake REQUIRED)
find_package(ament_cmake_uncrustify REQUIRED)
# This forces cppcheck to consider all files in this project to be C++,
# including the headers which end with .h, which cppcheck would normally
# consider to be C instead.
ament_cppcheck(LANGUAGE "c++")
ament_cpplint()
ament_lint_cmake()
ament_uncrustify()
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_export_include_directories(include)
Expand Down
3 changes: 3 additions & 0 deletions src/control/nav2_dwa_controller/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
<exec_depend>std_msgs</exec_depend>
<exec_depend>nav2_planning_msgs</exec_depend>

<test_depend>ament_lint_common</test_depend>
<test_depend>ament_lint_auto</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
Expand Down
14 changes: 0 additions & 14 deletions src/libs/nav2_libs_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,6 @@ rosidl_generate_interfaces(${PROJECT_NAME}
DEPENDENCIES builtin_interfaces geometry_msgs std_msgs
)

if(BUILD_TESTING)
find_package(ament_cmake_cppcheck REQUIRED)
find_package(ament_cmake_cpplint REQUIRED)
find_package(ament_cmake_lint_cmake REQUIRED)
find_package(ament_cmake_uncrustify REQUIRED)
# This forces cppcheck to consider all files in this project to be C++,
# including the headers which end with .h, which cppcheck would normally
# consider to be C instead.
ament_cppcheck(LANGUAGE "c++")
ament_cpplint()
ament_lint_cmake()
ament_uncrustify()
endif()

ament_export_dependencies(rosidl_default_runtime)

ament_package()
13 changes: 2 additions & 11 deletions src/libs/nav2_robot/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,8 @@ install(DIRECTORY include/
)

if(BUILD_TESTING)
find_package(ament_cmake_cppcheck REQUIRED)
find_package(ament_cmake_cpplint REQUIRED)
find_package(ament_cmake_lint_cmake REQUIRED)
find_package(ament_cmake_uncrustify REQUIRED)
# This forces cppcheck to consider all files in this project to be C++,
# including the headers which end with .h, which cppcheck would normally
# consider to be C instead.
ament_cppcheck(LANGUAGE "c++")
ament_cpplint()
ament_lint_cmake()
ament_uncrustify()
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_export_include_directories(include)
Expand Down
3 changes: 3 additions & 0 deletions src/libs/nav2_robot/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

<buildtool_depend>ament_cmake</buildtool_depend>

<test_depend>ament_lint_common</test_depend>
<test_depend>ament_lint_auto</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
Expand Down
13 changes: 2 additions & 11 deletions src/libs/nav2_tasks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,8 @@ rosidl_generate_interfaces(nav2_tasks
)

if(BUILD_TESTING)
find_package(ament_cmake_cppcheck REQUIRED)
find_package(ament_cmake_cpplint REQUIRED)
find_package(ament_cmake_lint_cmake REQUIRED)
find_package(ament_cmake_uncrustify REQUIRED)
# This forces cppcheck to consider all files in this project to be C++,
# including the headers which end with .h, which cppcheck would normally
# consider to be C instead.
ament_cppcheck(LANGUAGE "c++")
ament_cpplint()
ament_lint_cmake()
ament_uncrustify()
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_export_include_directories(include)
Expand Down
3 changes: 3 additions & 0 deletions src/libs/nav2_tasks/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
<exec_depend>rosidl_default_runtime</exec_depend>
<exec_depend>geometry_msgs</exec_depend>

<test_depend>ament_lint_common</test_depend>
<test_depend>ament_lint_auto</test_depend>

<member_of_group>rosidl_interface_packages</member_of_group>

<export>
Expand Down
13 changes: 2 additions & 11 deletions src/libs/nav2_util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,8 @@ install(DIRECTORY include/
)

if(BUILD_TESTING)
find_package(ament_cmake_cppcheck REQUIRED)
find_package(ament_cmake_cpplint REQUIRED)
find_package(ament_cmake_lint_cmake REQUIRED)
find_package(ament_cmake_uncrustify REQUIRED)
# This forces cppcheck to consider all files in this project to be C++,
# including the headers which end with .h, which cppcheck would normally
# consider to be C instead.
ament_cppcheck(LANGUAGE "c++")
ament_cpplint()
ament_lint_cmake()
ament_uncrustify()
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_export_include_directories(include)
Expand Down
3 changes: 3 additions & 0 deletions src/libs/nav2_util/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
<exec_depend>rclcpp</exec_depend>
<exec_depend>nav2_libs_msgs</exec_depend>

<test_depend>ament_lint_common</test_depend>
<test_depend>ament_lint_auto</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
Expand Down
7 changes: 6 additions & 1 deletion src/localization/nav2_amcl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ find_package(tf2 REQUIRED)
find_package(nav2_util REQUIRED)

include_directories(
include
include
${Boost_INCLUDE_DIRS}
)

Expand Down Expand Up @@ -71,6 +71,11 @@ install(TARGETS ${executable_name} ${library_name}
RUNTIME DESTINATION bin
)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_export_include_directories(include)

ament_package()
4 changes: 4 additions & 0 deletions src/localization/nav2_amcl/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
<build_depend>tf2_ros</build_depend>
<build_depend>tf2</build_depend>
<build_depend>nav2_util</build_depend>

<test_depend>ament_lint_common</test_depend>
<test_depend>ament_lint_auto</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
Expand Down
14 changes: 0 additions & 14 deletions src/mission_execution/nav2_mission_execution_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,6 @@ rosidl_generate_interfaces(${PROJECT_NAME}
DEPENDENCIES builtin_interfaces geometry_msgs std_msgs
)

if(BUILD_TESTING)
find_package(ament_cmake_cppcheck REQUIRED)
find_package(ament_cmake_cpplint REQUIRED)
find_package(ament_cmake_lint_cmake REQUIRED)
find_package(ament_cmake_uncrustify REQUIRED)
# This forces cppcheck to consider all files in this project to be C++,
# including the headers which end with .h, which cppcheck would normally
# consider to be C instead.
ament_cppcheck(LANGUAGE "c++")
ament_cpplint()
ament_lint_cmake()
ament_uncrustify()
endif()

ament_export_dependencies(rosidl_default_runtime)

ament_package()
13 changes: 2 additions & 11 deletions src/mission_execution/nav2_mission_executor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,8 @@ install(TARGETS ${executable_name} ${library_name}
)

if(BUILD_TESTING)
find_package(ament_cmake_cppcheck REQUIRED)
find_package(ament_cmake_cpplint REQUIRED)
find_package(ament_cmake_lint_cmake REQUIRED)
find_package(ament_cmake_uncrustify REQUIRED)
# This forces cppcheck to consider all files in this project to be C++,
# including the headers which end with .h, which cppcheck would normally
# consider to be C instead.
ament_cppcheck(LANGUAGE "c++")
ament_cpplint()
ament_lint_cmake()
ament_uncrustify()
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_package()
3 changes: 3 additions & 0 deletions src/mission_execution/nav2_mission_executor/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
<exec_depend>nav2_tasks</exec_depend>
<exec_depend>nav2_mission_execution_msgs</exec_depend>

<test_depend>ament_lint_common</test_depend>
<test_depend>ament_lint_auto</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
Expand Down
13 changes: 2 additions & 11 deletions src/navigation/nav2_bt_navigator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,8 @@ install(DIRECTORY include/
)

if(BUILD_TESTING)
find_package(ament_cmake_cppcheck REQUIRED)
find_package(ament_cmake_cpplint REQUIRED)
find_package(ament_cmake_lint_cmake REQUIRED)
find_package(ament_cmake_uncrustify REQUIRED)
# This forces cppcheck to consider all files in this project to be C++,
# including the headers which end with .h, which cppcheck would normally
# consider to be C instead.
ament_cppcheck(LANGUAGE "c++")
ament_cpplint()
ament_lint_cmake()
ament_uncrustify()
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_export_include_directories(include)
Expand Down
3 changes: 3 additions & 0 deletions src/navigation/nav2_bt_navigator/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
<exec_depend>nav2_tasks</exec_depend>
<exec_depend>nav2_planning_msgs</exec_depend>

<test_depend>ament_lint_common</test_depend>
<test_depend>ament_lint_auto</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
Expand Down
13 changes: 2 additions & 11 deletions src/navigation/nav2_simple_navigator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,8 @@ install(DIRECTORY include/
)

if(BUILD_TESTING)
find_package(ament_cmake_cppcheck REQUIRED)
find_package(ament_cmake_cpplint REQUIRED)
find_package(ament_cmake_lint_cmake REQUIRED)
find_package(ament_cmake_uncrustify REQUIRED)
# This forces cppcheck to consider all files in this project to be C++,
# including the headers which end with .h, which cppcheck would normally
# consider to be C instead.
ament_cppcheck(LANGUAGE "c++")
ament_cpplint()
ament_lint_cmake()
ament_uncrustify()
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_export_include_directories(include)
Expand Down
3 changes: 3 additions & 0 deletions src/navigation/nav2_simple_navigator/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
<exec_depend>nav2_tasks</exec_depend>
<exec_depend>nav2_planning_msgs</exec_depend>

<test_depend>ament_lint_common</test_depend>
<test_depend>ament_lint_auto</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
Expand Down
13 changes: 2 additions & 11 deletions src/planning/nav2_astar_planner/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,8 @@ install(DIRECTORY include/
)

if(BUILD_TESTING)
find_package(ament_cmake_cppcheck REQUIRED)
find_package(ament_cmake_cpplint REQUIRED)
find_package(ament_cmake_lint_cmake REQUIRED)
find_package(ament_cmake_uncrustify REQUIRED)
# This forces cppcheck to consider all files in this project to be C++,
# including the headers which end with .h, which cppcheck would normally
# consider to be C instead.
ament_cppcheck(LANGUAGE "c++")
ament_cpplint()
ament_lint_cmake()
ament_uncrustify()
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_export_include_directories(include)
Expand Down
3 changes: 3 additions & 0 deletions src/planning/nav2_astar_planner/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
<exec_depend>nav2_tasks</exec_depend>
<exec_depend>nav2_planning_msgs</exec_depend>

<test_depend>ament_lint_common</test_depend>
<test_depend>ament_lint_auto</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
Expand Down
13 changes: 2 additions & 11 deletions src/planning/nav2_dijkstra_planner/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,8 @@ install(DIRECTORY include/
)

if(BUILD_TESTING)
find_package(ament_cmake_cppcheck REQUIRED)
find_package(ament_cmake_cpplint REQUIRED)
find_package(ament_cmake_lint_cmake REQUIRED)
find_package(ament_cmake_uncrustify REQUIRED)
# This forces cppcheck to consider all files in this project to be C++,
# including the headers which end with .h, which cppcheck would normally
# consider to be C instead.
ament_cppcheck(LANGUAGE "c++")
ament_cpplint()
ament_lint_cmake()
ament_uncrustify()
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_export_include_directories(include)
Expand Down
3 changes: 3 additions & 0 deletions src/planning/nav2_dijkstra_planner/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
<exec_depend>nav2_util_msgs</exec_depend>
<exec_depend>nav2_world_model_msgs</exec_depend>

<test_depend>ament_lint_common</test_depend>
<test_depend>ament_lint_auto</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
Expand Down
14 changes: 0 additions & 14 deletions src/planning/nav2_planning_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,6 @@ rosidl_generate_interfaces(${PROJECT_NAME}
DEPENDENCIES builtin_interfaces geometry_msgs std_msgs
)

if(BUILD_TESTING)
find_package(ament_cmake_cppcheck REQUIRED)
find_package(ament_cmake_cpplint REQUIRED)
find_package(ament_cmake_lint_cmake REQUIRED)
find_package(ament_cmake_uncrustify REQUIRED)
# This forces cppcheck to consider all files in this project to be C++,
# including the headers which end with .h, which cppcheck would normally
# consider to be C instead.
ament_cppcheck(LANGUAGE "c++")
ament_cpplint()
ament_lint_cmake()
ament_uncrustify()
endif()

ament_export_dependencies(rosidl_default_runtime)

ament_package()
13 changes: 2 additions & 11 deletions src/world_model/nav2_costmap_world_model/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,8 @@ install(TARGETS ${executable_name} ${library_name}
RUNTIME DESTINATION lib/${PROJECT_NAME})

if(BUILD_TESTING)
find_package(ament_cmake_cppcheck REQUIRED)
find_package(ament_cmake_cpplint REQUIRED)
find_package(ament_cmake_lint_cmake REQUIRED)
find_package(ament_cmake_uncrustify REQUIRED)
# This forces cppcheck to consider all files in this project to be C++,
# including the headers which end with .h, which cppcheck would normally
# consider to be C instead.
ament_cppcheck(LANGUAGE "c++")
ament_cpplint()
ament_lint_cmake()
ament_uncrustify()
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_export_include_directories(include)
Expand Down
3 changes: 3 additions & 0 deletions src/world_model/nav2_costmap_world_model/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
<exec_depend>nav2_util_msgs</exec_depend>
<exec_depend>nav2_world_model_msgs</exec_depend>

<test_depend>ament_lint_common</test_depend>
<test_depend>ament_lint_auto</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
Expand Down
Loading