Skip to content

Should remove CMake logic that relies on lsb_release #575

@azeey

Description

@azeey

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Inbox

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions