Skip to content

Commit

Permalink
fix ament_clang_format on rolling/jazzy
Browse files Browse the repository at this point in the history
  • Loading branch information
berndpfrommer committed May 8, 2024
1 parent 61e0ef8 commit 4af5977
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cmake/ROS2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,14 @@ if(BUILD_TESTING)
find_package(ament_cmake_lint_cmake REQUIRED)
# find_package(ament_cmake_pep257 REQUIRED) # (does not work on galactic/foxy)
find_package(ament_cmake_xmllint REQUIRED)
find_package(ament_cmake_clang_format REQUIRED)

if(DEFINED ENV{ROS_DISTRO})
if($ENV{ROS_DISTRO} STREQUAL "jazzy" OR $ENV{ROS_DISTRO} STREQUAL "rolling")
else()
find_package(ament_cmake_clang_format REQUIRED)
ament_clang_format(CONFIG_FILE .clang-format)
endif()
endif()

ament_copyright()
ament_cppcheck(LANGUAGE c++)
Expand All @@ -122,7 +129,6 @@ if(BUILD_TESTING)
ament_lint_cmake()
# ament_pep257() # (does not work on galactic/foxy)
ament_xmllint()
ament_clang_format(CONFIG_FILE .clang-format)
endif()

ament_package()

0 comments on commit 4af5977

Please sign in to comment.