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

Should remove CMake logic that relies on lsb_release #575

Open
azeey opened this issue Feb 11, 2025 · 0 comments
Open

Should remove CMake logic that relies on lsb_release #575

azeey opened this issue Feb 11, 2025 · 0 comments
Assignees

Comments

@azeey
Copy link
Contributor

azeey commented Feb 11, 2025

We have some CMake logic that relies on an external tool, lsb_release

if (UNIX AND NOT APPLE)
execute_process(COMMAND lsb_release -cs
OUTPUT_VARIABLE RELEASE_CODENAME
RESULT_VARIABLE LSB_RESULT
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if( NOT (${LSB_RESULT} STREQUAL "0"))
message(WARNING "lsb_release executable not found. Disabling focal-specific workarounds")
elseif (${RELEASE_CODENAME} STREQUAL "focal")
set(UBUNTU_FOCAL 1)
elseif (${RELEASE_CODENAME} STREQUAL "bullseye")
set(DEBIAN_BULLSEYE 1)
endif()
endif()

Building gz-transport on a system where lsb_release is not installed generates a warning (see https://build.ros2.org/job/Jpr__gz_transport_vendor__ubuntu_noble_amd64/3/cmake/). Since we no longer support focal and there's nothing in the code that is conditioned on DEBIAN_BULLSEYE, we should remove this logic in the CMake and any associated macros in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Inbox
Development

No branches or pull requests

2 participants