Skip to content

Commit a1d8da4

Browse files
authored
Remove visibility macros (#1451)
1 parent f23b7d8 commit a1d8da4

File tree

69 files changed

+137
-1519
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+137
-1519
lines changed

ackermann_steering_controller/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
cmake_minimum_required(VERSION 3.16)
2-
project(ackermann_steering_controller LANGUAGES CXX)
2+
project(ackermann_steering_controller)
33

44
if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
55
add_compile_options(-Wall -Wextra -Wpedantic -Werror=conversion -Werror=unused-but-set-variable
66
-Werror=return-type -Werror=shadow -Werror=format -Werror=range-loop-construct
77
-Werror=missing-braces)
88
endif()
99

10+
# using this instead of visibility macros
11+
# S1 from https://github.com/ros-controls/ros2_controllers/issues/1053
12+
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
13+
1014
# find dependencies
1115
set(THIS_PACKAGE_INCLUDE_DEPENDS
1216
controller_interface
@@ -45,10 +49,6 @@ target_link_libraries(ackermann_steering_controller PUBLIC
4549
ackermann_steering_controller_parameters)
4650
ament_target_dependencies(ackermann_steering_controller PUBLIC ${THIS_PACKAGE_INCLUDE_DEPENDS})
4751

48-
# Causes the visibility macros to use dllexport rather than dllimport,
49-
# which is appropriate when building the dll but not consuming it.
50-
target_compile_definitions(ackermann_steering_controller PRIVATE "ACKERMANN_STEERING_CONTROLLER__VISIBILITY_BUILDING_DLL")
51-
5252
pluginlib_export_plugin_description_file(
5353
controller_interface ackermann_steering_controller.xml)
5454

ackermann_steering_controller/include/ackermann_steering_controller/ackermann_steering_controller.hpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
#include <memory>
2222

23-
#include "ackermann_steering_controller/visibility_control.h"
2423
#include "ackermann_steering_controller_parameters.hpp"
2524
#include "steering_controllers_library/steering_controllers_library.hpp"
2625

@@ -47,14 +46,11 @@ class AckermannSteeringController : public steering_controllers_library::Steerin
4746
public:
4847
AckermannSteeringController();
4948

50-
ACKERMANN_STEERING_CONTROLLER__VISIBILITY_PUBLIC controller_interface::CallbackReturn
51-
configure_odometry() override;
49+
controller_interface::CallbackReturn configure_odometry() override;
5250

53-
ACKERMANN_STEERING_CONTROLLER__VISIBILITY_PUBLIC bool update_odometry(
54-
const rclcpp::Duration & period) override;
51+
bool update_odometry(const rclcpp::Duration & period) override;
5552

56-
ACKERMANN_STEERING_CONTROLLER__VISIBILITY_PUBLIC void
57-
initialize_implementation_parameter_listener() override;
53+
void initialize_implementation_parameter_listener() override;
5854

5955
protected:
6056
std::shared_ptr<ackermann_steering_controller::ParamListener> ackermann_param_listener_;

ackermann_steering_controller/include/ackermann_steering_controller/visibility_control.h

Lines changed: 0 additions & 52 deletions
This file was deleted.

admittance_controller/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
cmake_minimum_required(VERSION 3.16)
2-
project(admittance_controller LANGUAGES CXX)
2+
project(admittance_controller)
33

44
if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
55
add_compile_options(-Wall -Wextra -Wpedantic -Werror=conversion -Werror=unused-but-set-variable
66
-Werror=return-type -Werror=shadow -Werror=format -Werror=range-loop-construct
77
-Werror=missing-braces)
88
endif()
99

10+
# using this instead of visibility macros
11+
# S1 from https://github.com/ros-controls/ros2_controllers/issues/1053
12+
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
13+
1014
set(THIS_PACKAGE_INCLUDE_DEPENDS
1115
angles
1216
control_msgs
@@ -54,10 +58,6 @@ target_link_libraries(admittance_controller PUBLIC
5458
)
5559
ament_target_dependencies(admittance_controller PUBLIC ${THIS_PACKAGE_INCLUDE_DEPENDS})
5660

57-
# Causes the visibility macros to use dllexport rather than dllimport,
58-
# which is appropriate when building the dll but not consuming it.
59-
target_compile_definitions(admittance_controller PRIVATE "ADMITTANCE_CONTROLLER_BUILDING_DLL")
60-
6161
pluginlib_export_plugin_description_file(controller_interface admittance_controller.xml)
6262

6363
if(BUILD_TESTING)

admittance_controller/include/admittance_controller/admittance_controller.hpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include "admittance_controller_parameters.hpp"
2626

2727
#include "admittance_controller/admittance_rule.hpp"
28-
#include "admittance_controller/visibility_control.h"
2928
#include "control_msgs/msg/admittance_controller_state.hpp"
3029
#include "controller_interface/chainable_controller_interface.hpp"
3130
#include "hardware_interface/types/hardware_interface_type_values.hpp"
@@ -43,46 +42,37 @@ using ControllerStateMsg = control_msgs::msg::AdmittanceControllerState;
4342
class AdmittanceController : public controller_interface::ChainableControllerInterface
4443
{
4544
public:
46-
ADMITTANCE_CONTROLLER_PUBLIC
4745
controller_interface::CallbackReturn on_init() override;
4846

4947
/// Export configuration of required state interfaces.
5048
/**
5149
* Allowed types of state interfaces are \ref hardware_interface::POSITION,
5250
* \ref hardware_interface::VELOCITY, \ref hardware_interface::ACCELERATION.
5351
*/
54-
ADMITTANCE_CONTROLLER_PUBLIC
5552
controller_interface::InterfaceConfiguration command_interface_configuration() const override;
5653

5754
/// Export configuration of required state interfaces.
5855
/**
5956
* Allowed types of state interfaces are \ref hardware_interface::POSITION,
6057
* \ref hardware_interface::VELOCITY, \ref hardware_interface::ACCELERATION.
6158
*/
62-
ADMITTANCE_CONTROLLER_PUBLIC
6359
controller_interface::InterfaceConfiguration state_interface_configuration() const override;
6460

65-
ADMITTANCE_CONTROLLER_PUBLIC
6661
controller_interface::CallbackReturn on_configure(
6762
const rclcpp_lifecycle::State & previous_state) override;
6863

69-
ADMITTANCE_CONTROLLER_PUBLIC
7064
controller_interface::CallbackReturn on_activate(
7165
const rclcpp_lifecycle::State & previous_state) override;
7266

73-
ADMITTANCE_CONTROLLER_PUBLIC
7467
controller_interface::CallbackReturn on_deactivate(
7568
const rclcpp_lifecycle::State & previous_state) override;
7669

77-
ADMITTANCE_CONTROLLER_PUBLIC
7870
controller_interface::CallbackReturn on_cleanup(
7971
const rclcpp_lifecycle::State & previous_state) override;
8072

81-
ADMITTANCE_CONTROLLER_PUBLIC
8273
controller_interface::CallbackReturn on_error(
8374
const rclcpp_lifecycle::State & previous_state) override;
8475

85-
ADMITTANCE_CONTROLLER_PUBLIC
8676
controller_interface::return_type update_and_write_commands(
8777
const rclcpp::Time & time, const rclcpp::Duration & period) override;
8878

admittance_controller/include/admittance_controller/visibility_control.h

Lines changed: 0 additions & 49 deletions
This file was deleted.

bicycle_steering_controller/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
cmake_minimum_required(VERSION 3.16)
2-
project(bicycle_steering_controller LANGUAGES CXX)
2+
project(bicycle_steering_controller)
33

44
if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
55
add_compile_options(-Wall -Wextra -Wpedantic -Werror=conversion -Werror=unused-but-set-variable
66
-Werror=return-type -Werror=shadow -Werror=format -Werror=range-loop-construct
77
-Werror=missing-braces)
88
endif()
99

10+
# using this instead of visibility macros
11+
# S1 from https://github.com/ros-controls/ros2_controllers/issues/1053
12+
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
13+
1014
# find dependencies
1115
set(THIS_PACKAGE_INCLUDE_DEPENDS
1216
controller_interface
@@ -45,10 +49,6 @@ target_link_libraries(bicycle_steering_controller PUBLIC
4549
bicycle_steering_controller_parameters)
4650
ament_target_dependencies(bicycle_steering_controller PUBLIC ${THIS_PACKAGE_INCLUDE_DEPENDS})
4751

48-
# Causes the visibility macros to use dllexport rather than dllimport,
49-
# which is appropriate when building the dll but not consuming it.
50-
target_compile_definitions(bicycle_steering_controller PRIVATE "BICYCLE_STEERING_CONTROLLER__VISIBILITY_BUILDING_DLL")
51-
5252
pluginlib_export_plugin_description_file(
5353
controller_interface bicycle_steering_controller.xml)
5454

bicycle_steering_controller/include/bicycle_steering_controller/bicycle_steering_controller.hpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
#include <memory>
2222

23-
#include "bicycle_steering_controller/visibility_control.h"
2423
#include "bicycle_steering_controller_parameters.hpp"
2524
#include "steering_controllers_library/steering_controllers_library.hpp"
2625

@@ -43,14 +42,11 @@ class BicycleSteeringController : public steering_controllers_library::SteeringC
4342
public:
4443
BicycleSteeringController();
4544

46-
BICYCLE_STEERING_CONTROLLER__VISIBILITY_PUBLIC controller_interface::CallbackReturn
47-
configure_odometry() override;
45+
controller_interface::CallbackReturn configure_odometry() override;
4846

49-
BICYCLE_STEERING_CONTROLLER__VISIBILITY_PUBLIC bool update_odometry(
50-
const rclcpp::Duration & period) override;
47+
bool update_odometry(const rclcpp::Duration & period) override;
5148

52-
BICYCLE_STEERING_CONTROLLER__VISIBILITY_PUBLIC void initialize_implementation_parameter_listener()
53-
override;
49+
void initialize_implementation_parameter_listener() override;
5450

5551
protected:
5652
std::shared_ptr<bicycle_steering_controller::ParamListener> bicycle_param_listener_;

bicycle_steering_controller/include/bicycle_steering_controller/visibility_control.h

Lines changed: 0 additions & 52 deletions
This file was deleted.

diff_drive_controller/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
cmake_minimum_required(VERSION 3.16)
2-
project(diff_drive_controller LANGUAGES CXX)
2+
project(diff_drive_controller)
33

44
if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
55
add_compile_options(-Wall -Wextra -Werror=conversion -Werror=unused-but-set-variable
66
-Werror=return-type -Werror=shadow -Werror=format -Werror=range-loop-construct
77
-Werror=missing-braces)
88
endif()
99

10+
# using this instead of visibility macros
11+
# S1 from https://github.com/ros-controls/ros2_controllers/issues/1053
12+
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
13+
1014
set(THIS_PACKAGE_INCLUDE_DEPENDS
1115
control_toolbox
1216
controller_interface
@@ -49,9 +53,6 @@ target_link_libraries(diff_drive_controller
4953
PUBLIC
5054
diff_drive_controller_parameters)
5155
ament_target_dependencies(diff_drive_controller PUBLIC ${THIS_PACKAGE_INCLUDE_DEPENDS})
52-
# Causes the visibility macros to use dllexport rather than dllimport,
53-
# which is appropriate when building the dll but not consuming it.
54-
target_compile_definitions(diff_drive_controller PRIVATE "DIFF_DRIVE_CONTROLLER_BUILDING_DLL")
5556
pluginlib_export_plugin_description_file(controller_interface diff_drive_plugin.xml)
5657

5758
if(BUILD_TESTING)

0 commit comments

Comments
 (0)