Add strict build.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2026-03-09 11:02:47 +01:00
parent cc0e4e43ca
commit 839fb431c4
35 changed files with 170 additions and 158 deletions

View File

@@ -96,13 +96,23 @@ if(NOT ESP_PLATFORM)
target_sources(pico_hsm PUBLIC ${SOURCES})
target_include_directories(pico_hsm PUBLIC ${INCLUDES})
target_compile_options(pico_hsm PUBLIC
set(COMMON_COMPILE_OPTIONS
-Wall
)
target_compile_options(pico_hsm PRIVATE ${COMMON_COMPILE_OPTIONS})
pico_keys_apply_strict_flags(
SOURCES ${SOURCES}
FILTER_REGEX "/src/hsm/|/pico-keys-sdk/src/|/pico-keys-sdk/config/"
)
if(NOT MSVC)
target_compile_options(pico_hsm PUBLIC
-Werror
)
string(FIND ${CMAKE_C_COMPILER} ":" COMPILER_COLON)
if(${COMPILER_COLON} GREATER_EQUAL 0)
target_compile_options(pico_hsm PRIVATE
-Wno-error=use-after-free
)
endif()
endif()
if(ENABLE_EMULATION)