Skip to content

Commit

Permalink
More specific prefix in some cmake_parse_argument calls (#523)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Egger <kevin.egger@sevensense.ch>
  • Loading branch information
eggerk authored May 13, 2024
1 parent 1388e09 commit fdbf457
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions ament_cmake_auto/cmake/ament_auto_package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#

macro(ament_auto_package)
cmake_parse_arguments(_ARG "INSTALL_TO_PATH" "" "INSTALL_TO_SHARE" ${ARGN})
cmake_parse_arguments(_ARG_AMENT_AUTO_PACKAGE "INSTALL_TO_PATH" "" "INSTALL_TO_SHARE" ${ARGN})
# passing all unparsed arguments to ament_package()

# export all found build dependencies which are also run dependencies
Expand Down Expand Up @@ -86,7 +86,7 @@ macro(ament_auto_package)

# install all executables
if(NOT ${PROJECT_NAME}_EXECUTABLES STREQUAL "")
if(_ARG_INSTALL_TO_PATH)
if(_ARG_AMENT_AUTO_PACKAGE_INSTALL_TO_PATH)
set(_destination "bin")
else()
set(_destination "lib/${PROJECT_NAME}")
Expand All @@ -98,7 +98,7 @@ macro(ament_auto_package)
endif()

# install directories to share
foreach(_dir ${_ARG_INSTALL_TO_SHARE})
foreach(_dir ${_ARG_AMENT_AUTO_PACKAGE_INSTALL_TO_SHARE})
install(
DIRECTORY "${_dir}"
DESTINATION "share/${PROJECT_NAME}"
Expand All @@ -107,5 +107,5 @@ macro(ament_auto_package)

ament_execute_extensions(ament_auto_package)

ament_package(${_ARG_UNPARSED_ARGUMENTS})
ament_package(${_ARG_AMENT_AUTO_PACKAGE_UNPARSED_ARGUMENTS})
endmacro()
8 changes: 4 additions & 4 deletions ament_cmake_core/cmake/core/ament_execute_extensions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
# @public
#
macro(ament_execute_extensions extension_point)
cmake_parse_arguments(_ARG "" "" "EXCLUDE" ${ARGN})
if(_ARG_UNPARSED_ARGUMENTS)
cmake_parse_arguments(_ARG_AMENT_EXECUTE_EXTENSIONS "" "" "EXCLUDE" ${ARGN})
if(_ARG_AMENT_EXECUTE_EXTENSIONS_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "ament_execute_extensions() called with "
"unused arguments: ${_ARG_UNPARSED_ARGUMENTS}")
"unused arguments: ${_ARG_AMENT_EXECUTE_EXTENSIONS_UNPARSED_ARGUMENTS}")
endif()
if(AMENT_EXTENSIONS_${extension_point})
foreach(_extension ${AMENT_EXTENSIONS_${extension_point}})
Expand All @@ -38,7 +38,7 @@ macro(ament_execute_extensions extension_point)
"name and cmake filename")
endif()
list(GET _extension_list 0 _pkg_name)
if("${_pkg_name}" IN_LIST _ARG_EXCLUDE)
if("${_pkg_name}" IN_LIST _ARG_AMENT_EXECUTE_EXTENSIONS_EXCLUDE)
continue()
endif()
list(GET _extension_list 1 _cmake_filename)
Expand Down

0 comments on commit fdbf457

Please sign in to comment.