Skip to content

build: Only enable -Werror for debug builds#69

Closed
chewi wants to merge 1 commit into
raspberrypi:masterfrom
chewi:werror
Closed

build: Only enable -Werror for debug builds#69
chewi wants to merge 1 commit into
raspberrypi:masterfrom
chewi:werror

Conversation

@chewi
Copy link
Copy Markdown

@chewi chewi commented Feb 6, 2024

-Werror is very unhelpful for distributions and end users as newer compilers will raise warnings that the maintainers may not see. The warnings should get reported upstream, but they shouldn't block users from using the software.

Rather than drop the flag entirely, I have enabled it only for debug builds, e.g. -DCMAKE_BUILD_TYPE=Debug.

@AshyPinguin
Copy link
Copy Markdown

I updated the changes to be applicable to the current source set
raspberrypi-utils-20260523-werror.patch

-Werror is very unhelpful for distributions and end users as newer
compilers will raise warnings that the maintainers may not see. The
warnings should get reported upstream, but they shouldn't block users
from using the software.

Rather than drop the flag entirely, I have enabled it only for debug
builds, e.g. -DCMAKE_BUILD_TYPE=Debug.

Signed-off-by: James Le Cuirot <chewi@gentoo.org>
@chewi
Copy link
Copy Markdown
Author

chewi commented May 27, 2026

I've now rebased this and included the new -Werror instances.

pelwell added a commit that referenced this pull request May 27, 2026
Move the -Werror flag from being the default to a CMake build flag -
ENABLE_WERROR - and set it in the workflow.

Fixes: #69

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
@pelwell pelwell closed this in #191 May 27, 2026
@pelwell
Copy link
Copy Markdown
Collaborator

pelwell commented May 27, 2026

We took a different route. I hope this meets your needs.

@chewi chewi deleted the werror branch May 27, 2026 22:03
@chewi
Copy link
Copy Markdown
Author

chewi commented May 27, 2026

It does, thank you.

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.

3 participants