Fix test compilation with USE_INTERNAL_URDF#800
Conversation
The USE_INTERNAL_URDF logic for include and windows compiler definitions needs to be repeated for tests that add parser_urdf.cc via target_sources. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Codecov Report
@@ Coverage Diff @@
## sdf10 #800 +/- ##
=======================================
Coverage 88.30% 88.30%
=======================================
Files 66 66
Lines 10571 10571
=======================================
Hits 9335 9335
Misses 1236 1236 Continue to review full report at Codecov.
|
| @@ -62,7 +62,13 @@ if (BUILD_TESTING) | |||
| endif() | |||
|
|
|||
| if (TARGET UNIT_ParamPassing_TEST) | |||
There was a problem hiding this comment.
Looking at the nested ifs and the target_ commands, is this check now superfluous and can be removed?
There was a problem hiding this comment.
if that is the case we can probably join both instructions related to UNIT_parser_urdf_TEST and UNIT_ParamPassing_TEST after the same if (USE_INTERNAL_URDF) clause.
There was a problem hiding this comment.
this block is inside if(BUILD_TESTING), but this test does not run on windows, so I think it is important to check that the test target exists. I think there is a more elegant way to express this; let me think about it...
There was a problem hiding this comment.
ok I've simplified it quite a bit in 2ba37d8 by using a cmake interface library
There was a problem hiding this comment.
I believe I've addressed this comment and will merge so I can prepare another prerelease pull request
j-rivero
left a comment
There was a problem hiding this comment.
Minor comment, looks good.
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
|
@osrf-jenkins run tests please |
|
@osrf-jenkins run tests please |
|
This pull request has been mentioned on Gazebo Community. There might be relevant details there: https://community.gazebosim.org/t/new-ignition-releases-2022-01-10/1228/1 |
|
This pull request has been mentioned on Gazebo Community. There might be relevant details there: https://community.gazebosim.org/t/new-ignition-releases-2022-03-25-fortress-edifice-citadel/1343/1 |
|
This pull request has been mentioned on Gazebo Community. There might be relevant details there: https://community.gazebosim.org/t/new-ignition-releases-2022-04-13-fortress-edifice/1367/1 |
🦟 Bug fix
Fixes compilation with
USE_INTERNAL_URDF== TrueSummary
I noticed that the 10.7.0~pre1 debbuilds failed to compile some tests with complaints about finding urdf headers:
It turns out the debbuilds are using
USE_INTERNAL_URDF == TRUEsincepkg-configis not listed as abuild-dependin the debian metadata. I will resolve that shortly. In the meantime, this ensures that theUSE_INTERNAL_URDFlogic for include and windows compiler definitions used for libsdformat10 is repeated for tests that addparser_urdf.ccviatarget_sources.Update: I've simplified the cmake logic using an interface library called
using_parser_urdf.Checklist
codecheckpassed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-bymessages.