Skip to content

Commit

Permalink
Change EXTRA_ARGS to be a multiValueArgs in GzFindPackage (#393)
Browse files Browse the repository at this point in the history
Add test for EXTRA_ARGS to gz_find_package

Signed-off-by: Jose Luis Rivero <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
Co-authored-by: Steve Peters <[email protected]>
  • Loading branch information
j-rivero and scpeters authored Nov 2, 2023
1 parent 200de1b commit 40db6b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions cmake/GzFindPackage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ macro(ign_find_package PACKAGE_NAME)
message(WARNING "ign_find_package is deprecated, use gz_find_package instead.")

set(options REQUIRED PRIVATE EXACT QUIET CONFIG BUILD_ONLY PKGCONFIG_IGNORE)
set(oneValueArgs VERSION PRETTY PURPOSE EXTRA_ARGS PKGCONFIG PKGCONFIG_LIB PKGCONFIG_VER_COMPARISON)
set(multiValueArgs REQUIRED_BY PRIVATE_FOR COMPONENTS OPTIONAL_COMPONENTS)
set(VERSION PRETTY PURPOSE PKGCONFIG PKGCONFIG_LIB PKGCONFIG_VER_COMPARISON)
set(multiValueArgs REQUIRED_BY PRIVATE_FOR COMPONENTS OPTIONAL_COMPONENTS EXTRA_ARGS)
_gz_cmake_parse_arguments(gz_find_package "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

set(gz_find_package_skip_parsing true)
Expand All @@ -170,8 +170,8 @@ macro(gz_find_package PACKAGE_NAME_)
#------------------------------------
# Define the expected arguments
set(options REQUIRED PRIVATE EXACT QUIET CONFIG BUILD_ONLY PKGCONFIG_IGNORE)
set(oneValueArgs VERSION PRETTY PURPOSE EXTRA_ARGS PKGCONFIG PKGCONFIG_LIB PKGCONFIG_VER_COMPARISON)
set(multiValueArgs REQUIRED_BY PRIVATE_FOR COMPONENTS OPTIONAL_COMPONENTS)
set(oneValueArgs VERSION PRETTY PURPOSE PKGCONFIG PKGCONFIG_LIB PKGCONFIG_VER_COMPARISON)
set(multiValueArgs REQUIRED_BY PRIVATE_FOR COMPONENTS OPTIONAL_COMPONENTS EXTRA_ARGS)

#------------------------------------
# Parse the arguments
Expand Down
2 changes: 1 addition & 1 deletion examples/core_child/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(gz-core_child VERSION 0.1.0)
find_package(gz-cmake3 REQUIRED)
gz_configure_project()
gz_find_package(gz-core_no_deps REQUIRED)
gz_find_package(gz-core_no_deps REQUIRED EXTRA_ARGS NAMES gz-core_no_deps)
gz_configure_build(QUIT_IF_BUILD_ERRORS)
gz_create_packages()
gz_create_docs(TAGFILES "${GZ-CORE_NO_DEPS_DOXYGEN_TAGFILE} = ${GZ-CORE_NO_DEPS_API_URL}")

0 comments on commit 40db6b2

Please sign in to comment.