-
Notifications
You must be signed in to change notification settings - Fork 18
Find gz-sim without major version #292
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
Find gz-sim without major version #292
Conversation
* Update cmake project name, package.xml name * Change gz-launch executable target name to avoid conflict with library target name. Set the OUTPUT_NAME property to retain same executable file name. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Companion to gazebosim/gz-sim#2726. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
CMakeLists.txt
Outdated
gz_find_package(gz-sim9 REQUIRED PRIVATE COMPONENTS gui) | ||
set(GZ_SIM_VER ${gz-sim9_VERSION_MAJOR}) | ||
gz_find_package(gz-sim REQUIRED PRIVATE COMPONENTS gui) | ||
set(GZ_SIM_VER ${gz-sim_VERSION_MAJOR}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could alternatively delete the GZ_SIM_VER
variable since I believe it is not used after these changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed in 28765fe
this is failing because the base branch is still using |
…ers/package_name_without_major_version_sim
merged and resolved conflicts, trying again
|
…_without_major_version_sim
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
trying again after the fix in 4966abf
|
this job has finished the build successfully and is running tests
|
just finished! |
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
# Find gz-sim | ||
gz_find_package(gz-sim10 REQUIRED PRIVATE COMPONENTS gui) | ||
set(GZ_SIM_VER ${gz-sim10_VERSION_MAJOR}) | ||
gz_find_package(gz-sim REQUIRED PRIVATE COMPONENTS gui) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My personal opinion here is that a configuration instructions should encode the known versions that work and specially the versions that are known not to work.
If we know that this is going to fail with gz-sim less than 10, let's encode it.
gz_find_package(gz-sim REQUIRED PRIVATE COMPONENTS gui) | |
gz_find_package(gz-sim REQUIRED VERSION 10 PRIVATE COMPONENTS gui) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had suggested in the shorter proposal gazebo-tooling/release-tools#1244 (comment) that we not use explicit version numbers when calling find_package
on the main branch, but that we add it in when creating stable release branches
- Finding Gazebo packages with cmake's
find_package
function:
- On
main
branches: the major version number should not be used when finding a package with cmake’sfind_package()
function. For example: find_package(gz-utils4 REQUIRED COMPONENTS log) should instead befind_package(gz-utils REQUIRED COMPONENTS log)
. This helps reduce maintenance churn on themain
branches.- When branching from
main
to create stable release branches: add explicit major versions into thefind_package
calls likefind_package(gz-utils 4 REQUIRED COMPONENTS log)
. This generates configuration errors when incompatible versions are built together, which is helpful.
I think this will reduce churn on the main
branches, while still providing helpful error messages for stable release branches
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah sorry, did not get that in mind. Sound fine.
🎉 New feature
Part of gazebo-tooling/release-tools#1244, companion to gazebosim/gz-sim#2726.
Summary
The major version is removed from the cmake project name for gz-sim in gazebosim/gz-sim#2726, so update the
find_package
andtarget_link_libraries
calls accordingly.Test it
Checklist
codecheck
passed (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-by
messages.