Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CONFIG arg in ign_find_package(DART) call #119

Merged
merged 1 commit into from
Oct 7, 2020

Conversation

scpeters
Copy link
Member

@scpeters scpeters commented Oct 7, 2020

The CONFIG argument to find_package does not have a corresponding argument in ign_find_package, though it happens to work in our ign_find_package(DART) call by accident since it gets treated as a component. It can be properly passed through as an EXTRA_ARGS parameter.

To reproduce the bug, change the order of the ign_find_package parameters with the following patch and observe that it gives a cmake warning for unrecognized arguments:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a732852..1c384ac 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -61,11 +61,11 @@ ign_find_package(sdformat10 REQUIRED_BY sdf dartsim tpe)
 #--------------------------------------
 # Find dartsim for the dartsim plugin wrapper
 ign_find_package(DART
+  CONFIG
   COMPONENTS
     collision-ode
     utils
     utils-urdf
-  CONFIG
   VERSION 6.9
   REQUIRED_BY dartsim
   PKGCONFIG dart
CMake Warning (dev) at /usr/share/cmake/ignition-cmake2/cmake2/IgnUtils.cmake:1758 (message):
  

  The build script has specified some unrecognized arguments for
  ign_find_package(~):

  CONFIG

  Either the script has a typo, or it is using an unexpected version of
  ign-cmake.  The version of ign-cmake currently being used is 2.4.0

Call Stack (most recent call first):
  /usr/share/cmake/ignition-cmake2/cmake2/IgnUtils.cmake:146 (_ign_cmake_parse_arguments)
  CMakeLists.txt:63 (ign_find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

I've filed gazebosim/gz-cmake#114 to track adding CONFIG as a supported option to ign_find_package, but let's just fix it for now.

The CONFIG argument to find_package does not have a corresponding
argument in ign_find_package, though it happens to work in our
ign_find_package(DART) call by accident since it gets treated
as a component. It can be properly passed through as an
EXTRA_ARGS parameter.

Signed-off-by: Steve Peters <[email protected]>
@scpeters scpeters requested review from azeey and mxgrey October 7, 2020 07:54
@scpeters scpeters changed the base branch from main to ign-physics3 October 7, 2020 07:54
@scpeters scpeters merged commit a76ec89 into gazebosim:ign-physics3 Oct 7, 2020
@scpeters scpeters deleted the find_dart_config_3 branch October 7, 2020 16:28
scpeters added a commit to scpeters/ign-physics that referenced this pull request Oct 7, 2020
The CONFIG argument to find_package does not have a corresponding
argument in ign_find_package, though it happens to work in our
ign_find_package(DART) call by accident since it gets treated
as a component. It can be properly passed through as an
EXTRA_ARGS parameter.

Signed-off-by: Steve Peters <[email protected]>
scpeters added a commit that referenced this pull request Oct 9, 2020
The CONFIG argument to find_package does not have a corresponding
argument in ign_find_package, though it happens to work in our
ign_find_package(DART) call by accident since it gets treated
as a component. It can be properly passed through as an
EXTRA_ARGS parameter.

Signed-off-by: Steve Peters <[email protected]>
scpeters added a commit to scpeters/ign-physics that referenced this pull request Oct 9, 2020
The CONFIG argument to find_package does not have a corresponding
argument in ign_find_package, though it happens to work in our
ign_find_package(DART) call by accident since it gets treated
as a component. It can be properly passed through as an
EXTRA_ARGS parameter.

Signed-off-by: Steve Peters <[email protected]>
scpeters added a commit that referenced this pull request Oct 9, 2020
The CONFIG argument to find_package does not have a corresponding
argument in ign_find_package, though it happens to work in our
ign_find_package(DART) call by accident since it gets treated
as a component. It can be properly passed through as an
EXTRA_ARGS parameter.

Signed-off-by: Steve Peters <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants