Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 6eb3c3c

Browse files
committed
Shorten some excessively long lines of CMake
The line length enforcement in ament_lint_cmake has been broken for some time, but will be fixed by ament/ament_lint#236. This change brings this package into compliance with a 120 column limit. Signed-off-by: Scott K Logan <logans@cottsay.net>
1 parent 4200ab0 commit 6eb3c3c

File tree

1 file changed

+26
-10
lines changed

1 file changed

+26
-10
lines changed

connext_cmake_module/cmake/Modules/FindConnext.cmake

+26-10
Original file line numberDiff line numberDiff line change
@@ -195,23 +195,33 @@ if(NOT _NDDSHOME STREQUAL "")
195195
_find_connext_libraries(_debug_libraries "${_debug_library_names}" "${_lib_path}")
196196

197197
# check if all expected libraries have been found exactly once
198-
_count_found_libraries(_optimized_libraries_count _found_all_optimized_libraries "${_optimized_library_names}" "${_optimized_libraries}")
199-
_count_found_libraries(_debug_libraries_count _found_all_debug_libraries "${_debug_library_names}" "${_debug_libraries}")
198+
_count_found_libraries(_optimized_libraries_count _found_all_optimized_libraries
199+
"${_optimized_library_names}" "${_optimized_libraries}")
200+
_count_found_libraries(_debug_libraries_count _found_all_debug_libraries
201+
"${_debug_library_names}" "${_debug_libraries}")
200202

201203
list(LENGTH _optimized_library_names _expected_length)
202204
if(_optimized_libraries_count GREATER _expected_length)
203-
message(WARNING "NDDSHOME set to '${_NDDSHOME}' but found multiple files named '${_optimized_library_names}' under '${_lib_path}': ${_optimized_libraries}")
205+
message(WARNING
206+
"NDDSHOME set to '${_NDDSHOME}' but found multiple files named '${_optimized_library_names}' "
207+
"under '${_lib_path}': ${_optimized_libraries}")
204208
set(_found_all_optimized_libraries FALSE)
205209
endif()
206210

207211
list(LENGTH _debug_library_names _expected_length)
208212
if(_debug_libraries_count GREATER _expected_length)
209-
message(WARNING "NDDSHOME set to '${_NDDSHOME}' but found multiple files named '${_debug_library_names}' under '${_lib_path}': ${_debug_libraries}")
213+
message(WARNING
214+
"NDDSHOME set to '${_NDDSHOME}' but found multiple files named '${_debug_library_names}' "
215+
"under '${_lib_path}': ${_debug_libraries}")
210216
set(_found_all_debug_libraries FALSE)
211217
endif()
212218

213219
if(NOT _found_all_optimized_libraries AND NOT _found_all_debug_libraries)
214-
message(FATAL_ERROR "NDDSHOME set to '${_NDDSHOME}' but could neither find all optimized libraries '${_optimized_library_names}' nor all debug libraries '${_debug_library_names}' under '${_lib_path}':\n- optimized: ${_optimized_libraries}\n- debug: ${_debug_libraries}")
220+
message(FATAL_ERROR
221+
"NDDSHOME set to '${_NDDSHOME}' but could neither find all optimized libraries '${_optimized_library_names}' "
222+
"nor all debug libraries '${_debug_library_names}' under '${_lib_path}':\n"
223+
"- optimized: ${_optimized_libraries}\n"
224+
"- debug: ${_debug_libraries}")
215225
endif()
216226

217227
set(Connext_LIBRARIES "")
@@ -288,23 +298,29 @@ else()
288298
set(Connext_FOUND TRUE)
289299

290300
# check if all expected libraries have been found exactly once
291-
_count_found_libraries(_optimized_libraries_count _found_all_optimized_libraries "${_optimized_library_names}" "${Connext_LIBRARIES}")
292-
_count_found_libraries(_debug_libraries_count _found_all_debug_libraries "${_debug_library_names}" "${Connext_LIBRARIES}")
301+
_count_found_libraries(_optimized_libraries_count _found_all_optimized_libraries
302+
"${_optimized_library_names}" "${Connext_LIBRARIES}")
303+
_count_found_libraries(_debug_libraries_count _found_all_debug_libraries
304+
"${_debug_library_names}" "${Connext_LIBRARIES}")
293305

294306
list(LENGTH _optimized_library_names _expected_length)
295307
if(_optimized_libraries_count GREATER _expected_length)
296-
message(WARNING "Found multiple files named '${_optimized_library_names}' in Connext_LIBRARIES: ${Connext_LIBRARIES}")
308+
message(WARNING
309+
"Found multiple files named '${_optimized_library_names}' in Connext_LIBRARIES: ${Connext_LIBRARIES}")
297310
set(_found_all_optimized_libraries FALSE)
298311
endif()
299312

300313
list(LENGTH _debug_library_names _expected_length)
301314
if(_debug_libraries_count GREATER _expected_length)
302-
message(WARNING "Found multiple files named '${_debug_library_names}' in Connext_LIBRARIES: ${Connext_LIBRARIES}")
315+
message(WARNING
316+
"Found multiple files named '${_debug_library_names}' in Connext_LIBRARIES: ${Connext_LIBRARIES}")
303317
set(_found_all_debug_libraries FALSE)
304318
endif()
305319

306320
if(NOT _found_all_optimized_libraries AND NOT _found_all_debug_libraries)
307-
message(FATAL_ERROR "Connext_LIBRARIES does neither contain all optimized libraries '${_optimized_library_names}' nor all debug libraries '${_debug_library_names}': ${Connext_LIBRARIES}")
321+
message(FATAL_ERROR
322+
"Connext_LIBRARIES does neither contain all optimized libraries '${_optimized_library_names}' "
323+
"nor all debug libraries '${_debug_library_names}': ${Connext_LIBRARIES}")
308324
endif()
309325
endif()
310326
endif()

0 commit comments

Comments
 (0)