Skip to content

Commit 1afe3e6

Browse files
committed
Fix build errors
1 parent 305176c commit 1afe3e6

File tree

2 files changed

+51
-55
lines changed

2 files changed

+51
-55
lines changed

tools/zed_benchmark/CMakeLists.txt

+25-28
Original file line numberDiff line numberDiff line change
@@ -52,38 +52,37 @@ if(${FOUND_ROS2_DISTRO} STREQUAL "humble" OR ${FOUND_ROS2_DISTRO} STREQUAL "iron
5252
set(CMAKE_BUILD_TYPE Release)
5353
endif()
5454

55-
# Default to C++14
56-
if(NOT CMAKE_CXX_STANDARD)
57-
set(CMAKE_CXX_STANDARD 14)
58-
endif()
55+
# Default to C++14
56+
if(NOT CMAKE_CXX_STANDARD)
57+
set(CMAKE_CXX_STANDARD 14)
58+
endif()
5959

60-
# dependencies
61-
set(DEPENDENCIES
62-
rclcpp
63-
rclcpp_components
64-
zed_topic_benchmark_component
65-
)
60+
# dependencies
61+
set(DEPENDENCIES
62+
rclcpp
63+
rclcpp_components
64+
zed_topic_benchmark_component
65+
)
6666

67-
find_package(ament_cmake_auto REQUIRED)
68-
ament_auto_find_build_dependencies()
67+
find_package(ament_cmake_auto REQUIRED)
68+
ament_auto_find_build_dependencies()
6969

70-
find_package(rclcpp REQUIRED)
71-
find_package(rclcpp_components REQUIRED)
72-
find_package(zed_topic_benchmark_component REQUIRED)
70+
find_package(rclcpp REQUIRED)
71+
find_package(rclcpp_components REQUIRED)
72+
find_package(zed_topic_benchmark_component REQUIRED)
7373

74-
if(BUILD_TESTING)
75-
find_package(ament_lint_auto REQUIRED)
76-
ament_lint_auto_find_test_dependencies()
77-
endif()
74+
if(BUILD_TESTING)
75+
find_package(ament_lint_auto REQUIRED)
76+
ament_lint_auto_find_test_dependencies()
77+
endif()
7878

79-
###############################################################################
80-
# Add all files in subdirectories of the project in
81-
# a dummy_target so qtcreator have access to all files
82-
file(GLOB_RECURSE extra_files ${CMAKE_SOURCE_DIR}/*)
83-
add_custom_target(${PROJECT_NAME}_files SOURCES ${extra_files})
84-
###############################################################################
79+
###############################################################################
80+
# Add all files in subdirectories of the project in
81+
# a dummy_target so qtcreator have access to all files
82+
file(GLOB_RECURSE extra_files ${CMAKE_SOURCE_DIR}/*)
83+
add_custom_target(${PROJECT_NAME}_files SOURCES ${extra_files})
84+
###############################################################################
8585

86-
if(${FOUND_ROS2_DISTRO} STREQUAL "humble" OR ${FOUND_ROS2_DISTRO} STREQUAL "iron")
8786
## Sources
8887
set(SRC_CONT src/topic_benchmark_container.cpp)
8988

@@ -103,6 +102,4 @@ if(${FOUND_ROS2_DISTRO} STREQUAL "humble" OR ${FOUND_ROS2_DISTRO} STREQUAL "iron
103102
ament_package()
104103
endif()
105104

106-
ament_package()
107-
108105

tools/zed_benchmark_component/CMakeLists.txt

+26-27
Original file line numberDiff line numberDiff line change
@@ -49,38 +49,37 @@ if(${FOUND_ROS2_DISTRO} STREQUAL "humble" OR ${FOUND_ROS2_DISTRO} STREQUAL "iron
4949
set(CMAKE_BUILD_TYPE Release)
5050
endif()
5151

52-
# Default to C++14
53-
if(NOT CMAKE_CXX_STANDARD)
54-
set(CMAKE_CXX_STANDARD 14)
55-
endif()
52+
# Default to C++14
53+
if(NOT CMAKE_CXX_STANDARD)
54+
set(CMAKE_CXX_STANDARD 14)
55+
endif()
5656

57-
# dependencies
58-
set(DEPENDENCIES
59-
rclcpp
60-
rclcpp_components
61-
zed_topic_benchmark_interfaces
62-
)
57+
# dependencies
58+
set(DEPENDENCIES
59+
rclcpp
60+
rclcpp_components
61+
zed_topic_benchmark_interfaces
62+
)
6363

64-
find_package(ament_cmake_auto REQUIRED)
65-
ament_auto_find_build_dependencies()
64+
find_package(ament_cmake_auto REQUIRED)
65+
ament_auto_find_build_dependencies()
6666

67-
find_package(rclcpp REQUIRED)
68-
find_package(rclcpp_components REQUIRED)
69-
find_package(zed_topic_benchmark_interfaces REQUIRED)
67+
find_package(rclcpp REQUIRED)
68+
find_package(rclcpp_components REQUIRED)
69+
find_package(zed_topic_benchmark_interfaces REQUIRED)
7070

71-
if(BUILD_TESTING)
72-
find_package(ament_lint_auto REQUIRED)
73-
ament_lint_auto_find_test_dependencies()
74-
endif()
71+
if(BUILD_TESTING)
72+
find_package(ament_lint_auto REQUIRED)
73+
ament_lint_auto_find_test_dependencies()
74+
endif()
7575

76-
###############################################################################
77-
# Add all files in subdirectories of the project in
78-
# a dummy_target so qtcreator have access to all files
79-
file(GLOB_RECURSE extra_files ${CMAKE_SOURCE_DIR}/*)
80-
add_custom_target(${PROJECT_NAME}_files SOURCES ${extra_files})
81-
###############################################################################
76+
###############################################################################
77+
# Add all files in subdirectories of the project in
78+
# a dummy_target so qtcreator have access to all files
79+
file(GLOB_RECURSE extra_files ${CMAKE_SOURCE_DIR}/*)
80+
add_custom_target(${PROJECT_NAME}_files SOURCES ${extra_files})
81+
###############################################################################
8282

83-
if(${FOUND_ROS2_DISTRO} STREQUAL "humble" OR ${FOUND_ROS2_DISTRO} STREQUAL "iron")
8483
## Sources
8584
set(SRC_COMP
8685
src/component/src/topic_benchmark_component.cpp
@@ -123,6 +122,6 @@ if(${FOUND_ROS2_DISTRO} STREQUAL "humble" OR ${FOUND_ROS2_DISTRO} STREQUAL "iron
123122
ament_package()
124123
endif()
125124

126-
ament_package()
125+
127126

128127

0 commit comments

Comments
 (0)