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

Project option: NO_IGNITION_PREFIX #191

Merged
merged 3 commits into from
Nov 5, 2021

Conversation

scpeters
Copy link
Member

@scpeters scpeters commented Nov 4, 2021

🎉 New feature

Helps with gazebosim/sdformat#181, split out from #190

Summary

Currently all cmake projects that use IgnConfigureProject are required to have a cmake project name that starts with ignition-. We would like to use ign-cmake2 with libsdformat, but its cmake project name and include paths don't follow this pattern. This pull request adds an option to IgnConfigureProject to allow more flexibility:

  • NO_IGNITION_PREFIX: option that prevents the ignition- prefix from being prepended to the cmake project name.

Test it

Look at the examples/no_ignition_prefix folder and build with cmake .. -DBUILDSYSTEM_TESTING=ON && make -j. The generated tarball name is confirmed to not start with ignition-

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge

This would allow projects (like sdformat) to use
ignition-cmake2 without requiring the project name
to start with ignition-.

Signed-off-by: Steve Peters <[email protected]>
@github-actions github-actions bot added Gazebo 1️1️ Dependency of Gazebo classic version 11 🌱 garden Ignition Garden 🏢 edifice Ignition Edifice 🏯 fortress Ignition Fortress 🏰 citadel Ignition Citadel 🔮 dome Ignition Dome labels Nov 4, 2021
Copy link
Contributor

@adlarkin adlarkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good, but I have a few questions about some of the empty files:

  1. examples/no_ignition_prefix/README.md is empty. Would you mind updating it to mention the purpose of this example? You could point to the NO_IGNITION_PREFIX option in the example project's CMakeLists.txt, and also point out that the tarball produced shouldn't have the ignition prefix.
  2. There are a few empty CMakeLists.txt files. Can they be removed?

@scpeters
Copy link
Member Author

scpeters commented Nov 5, 2021

Changes look good, but I have a few questions about some of the empty files:

1. `examples/no_ignition_prefix/README.md` is empty. Would you mind updating it to mention the purpose of this example? You could point to the `NO_IGNITION_PREFIX` option in the example project's `CMakeLists.txt`, and also point out that the tarball produced shouldn't have the `ignition` prefix.

2. There are a few empty `CMakeLists.txt` files. Can they be removed?

believe it or not, all of the empty files, including README.md are required. Try removing one, and you'll see build errors.

I will add a description to the example README.md as you suggest

@scpeters
Copy link
Member Author

scpeters commented Nov 5, 2021

  1. examples/no_ignition_prefix/README.md is empty. Would you mind updating it to mention the purpose of this example? You could point to the NO_IGNITION_PREFIX option in the example project's CMakeLists.txt, and also point out that the tarball produced shouldn't have the ignition prefix.

I will add a description to the example README.md as you suggest

e61efc0

@adlarkin adlarkin merged commit 3971db8 into gazebosim:ign-cmake2 Nov 5, 2021
@scpeters scpeters deleted the flexible_project_name branch November 5, 2021 16:51
@osrf-triage
Copy link

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

srmainwaring pushed a commit to srmainwaring/gz-cmake that referenced this pull request Mar 1, 2022
* IgnConfigureProject: add NO_IGNITION_PREFIX option

This would allow projects (like sdformat) to use
ignition-cmake2 without requiring the project name
to start with ignition-.

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
🏰 citadel Ignition Citadel 🔮 dome Ignition Dome 🏢 edifice Ignition Edifice 🏯 fortress Ignition Fortress 🌱 garden Ignition Garden Gazebo 1️1️ Dependency of Gazebo classic version 11
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants