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

Updates to compile cleanly on ROS 2 Rolling on Ubuntu 24.04 #415

Merged
merged 4 commits into from
Mar 17, 2024

Conversation

clalancette
Copy link
Contributor

There is more information in the individual commits, but this PR makes it so that octomap compiles warning-free on Ubuntu 24.04. While none of this is actually required to make it work there, it is a much nicer experience for users when there aren't tons of warnings.

Let me know if you'd like me to split this up into individual PRs, and I can do that.

Newer CMake complains about anything older than that,
and CMake 3.5 was released in 2016.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Calling message("mystring") in CMake, by default,
outputs to stderr.  Since these are generally informational
messages, change this to message(STATUS "mystring"), which
prints to stdout instead.  This should quite down warnings
when building with colcon (and on the ROS 2 buildfarm).

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Newer versions of CMake have changed how finding OpenGL
works.  If you don't specify anything at all, they will
complain that you haven't told them how to find OpenGL.

Work around this by explicitly setting OpenGL_GL_PREFERENCE
to LEGACY, which tells CMake how you want to find OpenGL.
This quiets the warning.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Apparently modern Qt has deprecated using an integer
to initialize Qt::Flags objects.  Instead, use the
default constructor which should do the same thing.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
@ahornung ahornung merged commit e5227fd into OctoMap:devel Mar 17, 2024
0 of 2 checks passed
@ahornung
Copy link
Member

Thanks for your contribution!

@clalancette clalancette deleted the clalancette/noble-updates branch March 18, 2024 12:27
c-andy-martin pushed a commit to BadgerTechnologies/octomap that referenced this pull request May 31, 2024
)

* Update minimum to CMake 3.5.

Newer CMake complains about anything older than that,
and CMake 3.5 was released in 2016.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>

* Cleanup stderr output from CMake.

Calling message("mystring") in CMake, by default,
outputs to stderr.  Since these are generally informational
messages, change this to message(STATUS "mystring"), which
prints to stdout instead.  This should quite down warnings
when building with colcon (and on the ROS 2 buildfarm).

Signed-off-by: Chris Lalancette <clalancette@gmail.com>

* Add in a variable to control how OpenGL is found.

Newer versions of CMake have changed how finding OpenGL
works.  If you don't specify anything at all, they will
complain that you haven't told them how to find OpenGL.

Work around this by explicitly setting OpenGL_GL_PREFERENCE
to LEGACY, which tells CMake how you want to find OpenGL.
This quiets the warning.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>

* Switch away from 0 for Qt::WindowFlags.

Apparently modern Qt has deprecated using an integer
to initialize Qt::Flags objects.  Instead, use the
default constructor which should do the same thing.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>

---------

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
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