Skip to content

Add compile-no-warning-as-error (CMake 3.24+) #40

@Ryanf55

Description

@Ryanf55

Certain projects such as NAV2 enable warnings as errors, not just in CI, but also for local development.
There are good reasons for doing this because NAV2 has contributions by many new developers that might ignore compile warnings.

Currently, to disable this, on Ubuntu 22, there is nothing to change except temporarily the source code,which is easy to accidentally commit.

When I build nav2 on rolling, due to it always changing, a newly introduced deprecation warning will now trigger a build failure, which defeats the purpose of a deprecation warning allowing smooth transitions away from unused features.

In new versions of CMake (3.24+), there is a new feature: compile-no-warning-as-error: https://cmake.org/cmake/help/latest/manual/cmake.1.html#cmdoption-cmake-compile-no-warning-as-error

With Kitware's apt repository, it's easy to install newer versions of CMake on the OS.

Would colcon-mixin accept a contribution for this as a mixin, or would it be prohibited because it doesn't work on LTS platforms?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions