As far as I can see, that is set in esp-idf\make\project.mk:390 (v4.4):
- # Warnings-related flags relevant both for C and C++
- COMMON_WARNING_FLAGS = -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
How can I override these without modifying esp-idf?
I have tried:
in project\main\CMakeLists.txt:
- target_compile_options(${COMPONENT_LIB} PRIVATE -Wall -Wextra -Werror -Wunused-variable)
- add_compile_options(-Wunused-variable)
- set_source_files_properties(main.c
- PROPERTIES COMPILE_FLAGS
- -Wunused-variable
- )
Both individually, and in combinations.
Thank you