Page 1 of 1

howto enable -Werror

Posted: Fri Feb 19, 2021 3:25 pm
by anthony
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.

Re: howto enable -Werror

Posted: Mon Mar 08, 2021 7:36 am
by ESP_renz
Hi anthony,

Can you post the snippet on how you are doing it currently?