Skip to content

Commit

Permalink
Update to uncrustify 0.78.1 (#37)
Browse files Browse the repository at this point in the history
* Update to uncrustify 0.78.1

* Fix the uncrustify version detection logic.

And make sure we are at least 0.78.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
  • Loading branch information
clalancette authored Apr 4, 2024
1 parent 37d7088 commit 17470d5
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 62 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ function(check_uncrustify RESULT PROGRAM)
set(${RESULT} FALSE PARENT_SCOPE)
else()
# Before 0.65 uncrustify used a different versioning scheme so the regex won't match
string(REGEX REPLACE "^Uncrustify-(.*)_f$" "\\1" version_prefix_match "${out}")
if(NOT version_prefix_match OR version_prefix_match VERSION_LESS 0.72)
string(REGEX REPLACE "^Uncrustify(_d|)-(.*)_f$" "\\2" version_prefix_match "${out}")
if(NOT version_prefix_match OR version_prefix_match VERSION_LESS 0.78)
set(${RESULT} FALSE PARENT_SCOPE)
endif()
endif()
Expand All @@ -31,7 +31,7 @@ endif()
ament_vendor(uncrustify_vendor
SATISFIED ${UNCRUSTIFY}
VCS_URL https://github.com/uncrustify/uncrustify.git
VCS_VERSION uncrustify-0.72.0
VCS_VERSION uncrustify-0.78.1
PATCHES patches
CMAKE_ARGS
-DNoGitVersionString=ON
Expand Down
51 changes: 51 additions & 0 deletions patches/0001-Simplify-installation-for-ROS-2-needs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
From 5409b03b54deb1416d90ccfa150d059f05d7761a Mon Sep 17 00:00:00 2001
From: Chris Lalancette <clalancette@gmail.com>
Date: Wed, 3 Apr 2024 09:29:24 -0400
Subject: [PATCH] Simplify installation for ROS 2 needs.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
---
CMakeLists.txt | 22 +---------------------
1 file changed, 1 insertion(+), 21 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6a48dae0e..a9a3eecfe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -520,32 +520,12 @@ include(CPack)
# Install
#
if(MSVC)
- install(TARGETS uncrustify DESTINATION ".")
- install(FILES ${uncrustify_docs}
- DESTINATION "."
- )
- install(FILES "${PROJECT_SOURCE_DIR}/documentation/htdocs/index.html"
- DESTINATION "doc"
- )
- install(DIRECTORY "${PROJECT_SOURCE_DIR}/etc/"
- DESTINATION "cfg"
- FILES_MATCHING PATTERN "*.cfg"
- )
+ install(TARGETS uncrustify RUNTIME DESTINATION bin)
else()
include(GNUInstallDirs)
install(TARGETS uncrustify
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
)
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/uncrustify.1"
- DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
- )
- install(DIRECTORY "${PROJECT_SOURCE_DIR}/etc/"
- DESTINATION "${CMAKE_INSTALL_DOCDIR}/examples"
- FILES_MATCHING PATTERN "*.cfg"
- )
- install(FILES ${uncrustify_docs}
- DESTINATION "${CMAKE_INSTALL_DOCDIR}"
- )
endif()

#
--
2.44.0

59 changes: 0 additions & 59 deletions patches/0001-install-patch.diff

This file was deleted.

0 comments on commit 17470d5

Please sign in to comment.