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