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

Unhide cmake warning when Python3 Development is not found #565

Merged
merged 2 commits into from
Jan 9, 2025

Conversation

scpeters
Copy link
Member

@scpeters scpeters commented Jan 9, 2025

🦟 Bug fix

Unhides a cmake warning when python bindings will not be built

Summary

A cmake warning should be printed when python bindings will not be built (controlled by the logic around add_subdirectory(python)), but the warning was in a separate part of the code, allowing the warning to be missed if the Python3_Development_FOUND variable changed in between.

Since GZ_BUILD_WARNING("") only generates a cmake warning if invoked before gz_configure_build, I switched to use message(WARNING "") in e464330.

Also, the failed Ubuntu Noble CI build is expected because finding python is currently broken for all platforms, but only our Ubuntu Noble CI builds report cmake warnings. I believe finding python should be fixed once gazebosim/gz-msgs#479 is merged and released. I think it would be worth merging this so that our broken state is accurately reflected.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • 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 and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

The value of this variable may change, so move the
warning to be co-located with the add_subdirectory call.

Signed-off-by: Steve Peters <[email protected]>
@scpeters scpeters requested a review from caguero as a code owner January 9, 2025 06:20
@github-actions github-actions bot added 🏛️ ionic Gazebo Ionic 🪵 jetty Gazebo Jetty labels Jan 9, 2025
Signed-off-by: Steve Peters <[email protected]>
@scpeters scpeters changed the title Unify Python3_Development_FOUND checks Unhide cmake warning when Python3 Development is not found Jan 9, 2025
@scpeters
Copy link
Member Author

scpeters commented Jan 9, 2025

this should be ported to gz-math and sdformat as well, since they use the same logic pattern

@scpeters scpeters merged commit f9cd5c5 into gz-transport14 Jan 9, 2025
9 of 10 checks passed
@scpeters scpeters deleted the scpeters/fix_python_warning branch January 9, 2025 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏛️ ionic Gazebo Ionic 🪵 jetty Gazebo Jetty
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants