add_compile_options(
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wall>
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wextra>
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wpedantic> # Note not used in GNU to allow C99 designated initializers.
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Werror>
)
Also when I do this I get quite a few warnings in ota and other directories - might want to consider compiling with these and cleaning up these issues. Some/most of the issues are related to the imported libraries from FreeRTOS, but there are a few in the port and config files.
Here's my cmake file that I use to compile Natively (outside esp-idf environment). Reason - to allow mocking and native compiles which are restricted when using the esp_idf cmake-like-wrapped environment.
When compiling with GNU 10 (default for ubuntu 22.04)
Have following error:
Note I am compiling with:
Also when I do this I get quite a few warnings in ota and other directories - might want to consider compiling with these and cleaning up these issues. Some/most of the issues are related to the imported libraries from FreeRTOS, but there are a few in the port and config files.
Here's my cmake file that I use to compile Natively (outside esp-idf environment). Reason - to allow mocking and native compiles which are restricted when using the esp_idf
cmake-like-wrapped
environment.esp_aws_iot.cmake.txt