howto enable -Werror

anthony
Posts: 8
Joined: Tue Mar 31, 2020 6:37 pm

howto enable -Werror

Postby anthony » Fri Feb 19, 2021 3:25 pm

Hi, I am trying to enable the -Werror flag in the main component so far without success.

I tried the steps suggested here: https://docs.espressif.com/projects/esp ... figuration
The flag is applied, but overridden by some other -Wno-error=... flags that are placed after it. Is there any way to override this behavior?

Here are what the flags look like in compile_commands.json:

Code: Select all

-Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -Og -std=gnu99 -Wno-old-style-declaration
Thanks

Edit:

Seems that using set_source_files_properties does work for some reason.

Who is online

Users browsing this forum: No registered users and 37 guests