Skip to content

Commit 30577fb

Browse files
Use global cmake macros (#316)
1 parent 6b4e905 commit 30577fb

5 files changed

+14
-6
lines changed

CMakeLists.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
cmake_minimum_required(VERSION 3.16)
22
project(control_toolbox LANGUAGES CXX)
33

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

97
if(WIN32)
108
add_compile_definitions(
@@ -16,7 +14,7 @@ if(WIN32)
1614
WIN32_LEAN_AND_MEAN
1715
)
1816
# set the same behavior for windows as it is on linux
19-
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
17+
export_windows_symbols()
2018
endif()
2119

2220
set(THIS_PACKAGE_INCLUDE_DEPENDS

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
control_toolbox
22
===========
33
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
4-
[![Licence](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
4+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
55
[![codecov](https://codecov.io/gh/ros-controls/control_toolbox/graph/badge.svg?token=0o4dFzADHj)](https://codecov.io/gh/ros-controls/control_toolbox)
66

77
This package contains several C++ classes useful in writing controllers.

control_toolbox.jazzy.repos

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ repositories:
77
type: git
88
url: https://github.com/ros-controls/realtime_tools
99
version: jazzy
10+
ros2_control_cmake:
11+
type: git
12+
url: https://github.com/ros-controls/ros2_control_cmake.git
13+
version: master

control_toolbox.rolling.repos

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ repositories:
77
type: git
88
url: https://github.com/ros-controls/realtime_tools
99
version: master
10+
ros2_control_cmake:
11+
type: git
12+
url: https://github.com/ros-controls/ros2_control_cmake.git
13+
version: master

package.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
<buildtool_depend>ament_cmake</buildtool_depend>
2323

24+
<build_depend>ros2_control_cmake</build_depend>
25+
2426
<depend>control_msgs</depend>
2527
<depend>eigen</depend>
2628
<depend>filters</depend>

0 commit comments

Comments
 (0)