Skip to content

Commit b681e59

Browse files
authored
Address ament_lint_cmake regressions (#604)
We don't actively enforce linters in `ament_cmake`, but it's still nice to be consistent. Signed-off-by: Scott K Logan <[email protected]>
1 parent e7b9fe7 commit b681e59

File tree

5 files changed

+16
-7
lines changed

5 files changed

+16
-7
lines changed

ament_cmake_core/cmake/symlink_install/ament_cmake_symlink_install.cmake.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function(ament_cmake_symlink_install_directory cmake_current_source_dir)
5555
# remove trailing slash
5656
string(SUBSTRING "${dir}" 0 ${offset} dir)
5757
endif()
58-
58+
5959
# Create destination directory.
6060
# This does *not* solve the problem of empty directories WITHIN the install tree,
6161
# but does make sure that the top-level directory specified by the caller gets created.

ament_cmake_export_targets/cmake/ament_export_targets.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# :param HAS_LIBRARY_TARGET: if set, an environment variable will be defined
2323
# so that the library can be found at runtime
2424
# :type HAS_LIBRARY_TARGET: option
25-
# :keyword NAMESPACE: the exported namespace for the target if set.
25+
# :keyword NAMESPACE: the exported namespace for the target if set.
2626
# The default is the value of ``${PROJECT_NAME}::``.
2727
# This is an advanced option. It should be used carefully and clearly documented
2828
# in a usage guide for any package that makes use of this option.

ament_cmake_gen_version_h/cmake/ament_generate_version_header.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
# :type target: string
7474
# :param HEADER_PATH: Path of the generated header including the file name
7575
# that describes how it should be included by downstream targets.
76-
# The default is `${PROJECT_NAME}/version.h`
76+
# The default is `${PROJECT_NAME}/version.h`
7777
# :type HEADER_PATH: string
7878
# :param INSTALL_PATH: Path that the header should be installed at.
7979
# The default value is "include/${PROJECT_NAME}" to avoid include directory
@@ -153,7 +153,7 @@ function(ament_generate_version_header target)
153153

154154
# Make generated header includable to this and downstream targets
155155
get_target_property(type "${target}" TYPE)
156-
if (${type} STREQUAL "INTERFACE_LIBRARY")
156+
if(${type} STREQUAL "INTERFACE_LIBRARY")
157157
set(keyword "INTERFACE")
158158
else()
159159
set(keyword "PUBLIC")

ament_cmake_gen_version_h/cmake/generate_version_header.cmake.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
#
99
# Unless required by applicable law or agreed to in writing, software
1010
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
1213
# limitations under the License.
1314

1415
# Generated from generate_version_header.cmake.in

ament_cmake_libraries/cmake/ament_libraries_deduplicate.cmake

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,17 @@
2626
# @public
2727
#
2828
macro(ament_libraries_deduplicate VAR)
29-
string(REGEX REPLACE "(^|;)(debug|optimized|general);([^;]+)" "\\1\\2${AMENT_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}\\3" _packed "${ARGN}")
29+
string(REGEX REPLACE
30+
"(^|;)(debug|optimized|general);([^;]+)"
31+
"\\1\\2${AMENT_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}\\3"
32+
_packed
33+
"${ARGN}")
3034
list(REVERSE _packed)
3135
list(REMOVE_DUPLICATES _packed)
3236
list(REVERSE _packed)
33-
string(REGEX REPLACE "(^|;)(debug|optimized|general)${AMENT_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}([^;]+)" "\\1\\2;\\3" ${VAR} "${_packed}")
37+
string(REGEX REPLACE
38+
"(^|;)(debug|optimized|general)${AMENT_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}([^;]+)"
39+
"\\1\\2;\\3"
40+
${VAR}
41+
"${_packed}")
3442
endmacro()

0 commit comments

Comments
 (0)