From 0af15bad975f1829e36b2eaa3ee23457aa2b2588 Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Fri, 12 Feb 2021 05:06:32 -0800 Subject: [PATCH] Shorten some excessively long lines of CMake (#99) 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 --- cmake/shiboken_helper.cmake | 12 ++++++++++-- cmake/sip_helper.cmake | 3 ++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/cmake/shiboken_helper.cmake b/cmake/shiboken_helper.cmake index c32b448..6334b7d 100644 --- a/cmake/shiboken_helper.cmake +++ b/cmake/shiboken_helper.cmake @@ -61,14 +61,22 @@ endif() macro(_shiboken_generator_command VAR GLOBAL TYPESYSTEM INCLUDE_PATH BUILD_DIR) # Add includes from current directory, Qt, PySide and compiler specific dirs get_directory_property(SHIBOKEN_HELPER_INCLUDE_DIRS INCLUDE_DIRECTORIES) - list(APPEND SHIBOKEN_HELPER_INCLUDE_DIRS ${QT_INCLUDE_DIR} ${PYSIDE_INCLUDE_DIR} ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}) + list(APPEND SHIBOKEN_HELPER_INCLUDE_DIRS + ${QT_INCLUDE_DIR} + ${PYSIDE_INCLUDE_DIR} + ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}) # See ticket https://code.ros.org/trac/ros-pkg/ticket/5219 set(SHIBOKEN_HELPER_INCLUDE_DIRS_WITH_COLONS "") foreach(dir ${SHIBOKEN_HELPER_INCLUDE_DIRS}) set(SHIBOKEN_HELPER_INCLUDE_DIRS_WITH_COLONS "${SHIBOKEN_HELPER_INCLUDE_DIRS_WITH_COLONS}:${dir}") endforeach() string(REPLACE ";" ":" INCLUDE_PATH_WITH_COLONS "${INCLUDE_PATH}") - set(${VAR} ${SHIBOKEN_BINARY} --generatorSet=shiboken --enable-pyside-extensions --include-paths=${INCLUDE_PATH_WITH_COLONS}${SHIBOKEN_HELPER_INCLUDE_DIRS_WITH_COLONS} --typesystem-paths=${PYSIDE_TYPESYSTEMS} --output-directory=${BUILD_DIR} ${GLOBAL} ${TYPESYSTEM}) + set(${VAR} ${SHIBOKEN_BINARY} + --generatorSet=shiboken + --enable-pyside-extensions + --include-paths=${INCLUDE_PATH_WITH_COLONS}${SHIBOKEN_HELPER_INCLUDE_DIRS_WITH_COLONS} + --typesystem-paths=${PYSIDE_TYPESYSTEMS} + --output-directory=${BUILD_DIR} ${GLOBAL} ${TYPESYSTEM}) endmacro() diff --git a/cmake/sip_helper.cmake b/cmake/sip_helper.cmake index 8646b71..3fe8d49 100644 --- a/cmake/sip_helper.cmake +++ b/cmake/sip_helper.cmake @@ -81,7 +81,8 @@ function(build_sip_binding PROJECT_NAME SIP_FILE) add_custom_command( OUTPUT ${SIP_BUILD_DIR}/Makefile - COMMAND ${PYTHON_EXECUTABLE} ${sip_SIP_CONFIGURE} ${SIP_BUILD_DIR} ${SIP_FILE} ${sip_LIBRARY_DIR} \"${INCLUDE_DIRS}\" \"${LIBRARIES}\" \"${LIBRARY_DIRS}\" \"${LDFLAGS_OTHER}\" + COMMAND ${PYTHON_EXECUTABLE} ${sip_SIP_CONFIGURE} ${SIP_BUILD_DIR} ${SIP_FILE} ${sip_LIBRARY_DIR} + \"${INCLUDE_DIRS}\" \"${LIBRARIES}\" \"${LIBRARY_DIRS}\" \"${LDFLAGS_OTHER}\" DEPENDS ${sip_SIP_CONFIGURE} ${SIP_FILE} ${sip_DEPENDS} WORKING_DIRECTORY ${sip_SOURCE_DIR} COMMENT "Running SIP generator for ${PROJECT_NAME} Python bindings..."