Skip to content

Commit d1dcda6

Browse files
Use ros2_control_cmake
1 parent 53dc5e0 commit d1dcda6

File tree

12 files changed

+25
-45
lines changed

12 files changed

+25
-45
lines changed

controller_interface/CMakeLists.txt

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
cmake_minimum_required(VERSION 3.16)
22
project(controller_interface LANGUAGES CXX)
33

4-
if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
5-
add_compile_options(-Wall -Wextra -Werror=conversion -Werror=unused-but-set-variable -Werror=return-type -Werror=shadow
6-
-Werror=missing-braces)
7-
endif()
8-
9-
# using this instead of visibility macros
10-
# S1 from https://github.com/ros-controls/ros2_controllers/issues/1053
11-
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
4+
find_package(ros2_control_cmake REQUIRED)
5+
set_compiler_options()
6+
export_windows_symbols()
127

138
set(THIS_PACKAGE_INCLUDE_DEPENDS
149
hardware_interface

controller_interface/package.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
<buildtool_depend>ament_cmake_gen_version_h</buildtool_depend>
1515

1616
<build_depend>hardware_interface</build_depend>
17-
<build_depend>realtime_tools</build_depend>
1817
<build_depend>rclcpp_lifecycle</build_depend>
18+
<build_depend>realtime_tools</build_depend>
19+
<build_depend>ros2_control_cmake</build_depend>
1920
<build_depend>sensor_msgs</build_depend>
2021

2122
<build_export_depend>hardware_interface</build_export_depend>

controller_manager/CMakeLists.txt

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
cmake_minimum_required(VERSION 3.16)
22
project(controller_manager LANGUAGES CXX)
33

4-
if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
5-
add_compile_options(-Wall -Wextra -Werror=conversion -Werror=unused-but-set-variable -Werror=return-type -Werror=shadow
6-
-Werror=missing-braces)
7-
endif()
8-
9-
# using this instead of visibility macros
10-
# S1 from https://github.com/ros-controls/ros2_controllers/issues/1053
11-
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
4+
find_package(ros2_control_cmake REQUIRED)
5+
set_compiler_options()
6+
export_windows_symbols()
127

138
set(THIS_PACKAGE_INCLUDE_DEPENDS
149
controller_interface

controller_manager/package.xml

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<buildtool_depend>ament_cmake</buildtool_depend>
1414
<buildtool_depend>ament_cmake_gen_version_h</buildtool_depend>
1515
<buildtool_depend>ament_cmake_python</buildtool_depend>
16+
<build_depend>ros2_control_cmake</build_depend>
1617

1718
<depend>backward_ros</depend>
1819
<depend>controller_interface</depend>

hardware_interface/CMakeLists.txt

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
cmake_minimum_required(VERSION 3.16)
22
project(hardware_interface LANGUAGES CXX)
33

4-
if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
5-
add_compile_options(-Wall -Wextra -Werror=conversion -Werror=unused-but-set-variable -Werror=return-type -Werror=shadow
6-
-Werror=missing-braces)
7-
endif()
8-
9-
# using this instead of visibility macros
10-
# S1 from https://github.com/ros-controls/ros2_controllers/issues/1053
11-
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
4+
find_package(ros2_control_cmake REQUIRED)
5+
set_compiler_options()
6+
export_windows_symbols()
127

138
set(THIS_PACKAGE_INCLUDE_DEPENDS
149
control_msgs

hardware_interface/package.xml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
<buildtool_depend>ament_cmake</buildtool_depend>
1313
<buildtool_depend>ament_cmake_gen_version_h</buildtool_depend>
14+
<build_depend>ros2_control_cmake</build_depend>
1415

1516
<depend>backward_ros</depend>
1617
<depend>control_msgs</depend>

hardware_interface_testing/CMakeLists.txt

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
cmake_minimum_required(VERSION 3.16)
22
project(hardware_interface_testing LANGUAGES CXX)
33

4-
if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
5-
add_compile_options(-Wall -Wextra -Werror=conversion -Werror=unused-but-set-variable -Werror=return-type -Werror=shadow
6-
-Werror=missing-braces)
7-
endif()
4+
find_package(ros2_control_cmake REQUIRED)
5+
set_compiler_options()
6+
export_windows_symbols()
87

98
set(THIS_PACKAGE_INCLUDE_DEPENDS
109
control_msgs

hardware_interface_testing/package.xml

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<license>Apache License 2.0</license>
1111

1212
<buildtool_depend>ament_cmake</buildtool_depend>
13+
<build_depend>ros2_control_cmake</build_depend>
1314

1415
<depend>control_msgs</depend>
1516
<depend>hardware_interface</depend>

joint_limits/CMakeLists.txt

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
cmake_minimum_required(VERSION 3.16)
22
project(joint_limits LANGUAGES CXX)
33

4-
if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
5-
add_compile_options(-Wall -Wextra -Werror=conversion -Werror=unused-but-set-variable -Werror=return-type -Werror=shadow
6-
-Werror=missing-braces)
7-
endif()
8-
9-
# using this instead of visibility macros
10-
# S1 from https://github.com/ros-controls/ros2_controllers/issues/1053
11-
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
4+
find_package(ros2_control_cmake REQUIRED)
5+
set_compiler_options()
6+
export_windows_symbols()
127

138
set(THIS_PACKAGE_INCLUDE_DEPENDS
149
pluginlib

joint_limits/package.xml

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
<buildtool_depend>ament_cmake</buildtool_depend>
1818
<buildtool_depend>ament_cmake_gen_version_h</buildtool_depend>
19+
<build_depend>ros2_control_cmake</build_depend>
1920

2021
<depend>backward_ros</depend>
2122
<depend>pluginlib</depend>

transmission_interface/CMakeLists.txt

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
cmake_minimum_required(VERSION 3.16)
22
project(transmission_interface LANGUAGES CXX)
33

4-
if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
5-
add_compile_options(-Wall -Wextra -Werror=conversion -Werror=unused-but-set-variable -Werror=return-type -Werror=shadow
6-
-Werror=missing-braces)
7-
endif()
8-
9-
# using this instead of visibility macros
10-
# S1 from https://github.com/ros-controls/ros2_controllers/issues/1053
11-
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
4+
find_package(ros2_control_cmake REQUIRED)
5+
set_compiler_options()
6+
export_windows_symbols()
127

138
set(THIS_PACKAGE_INCLUDE_DEPENDS
149
hardware_interface

transmission_interface/package.xml

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
<buildtool_depend>ament_cmake</buildtool_depend>
1414
<buildtool_depend>ament_cmake_gen_version_h</buildtool_depend>
15+
<build_depend>ros2_control_cmake</build_depend>
1516

1617
<depend>hardware_interface</depend>
1718
<depend>pluginlib</depend>

0 commit comments

Comments
 (0)