howto enable -Werror
Posted: 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:
Thanks
Edit:
Seems that using set_source_files_properties does work for some reason.
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
Edit:
Seems that using set_source_files_properties does work for some reason.