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.

ESP_renz
Posts: 18
Joined: Tue May 14, 2019 2:41 am

Re: howto enable -Werror

Postby ESP_renz » Mon Mar 08, 2021 7:36 am

Hi anthony,

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

Who is online

Users browsing this forum: Majestic-12 [Bot] and 403 guests