From bb003f7bd35b87c213523df162808bb052cdff7a Mon Sep 17 00:00:00 2001 From: Tomi Fontanilles Date: Thu, 14 Nov 2024 16:59:38 +0200 Subject: [PATCH] secure_storage: warn when there is no ITS store module implementation Output a CMake error when the ITS store module is enabled but no implementation ended up enabled (due to unfulfilled prerequisites). This is to make it more clear than undefined references at link time. Not a fatal error because CMake cannot fail for the twister filtering to work on the tests. Signed-off-by: Tomi Fontanilles --- subsys/secure_storage/src/its/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/subsys/secure_storage/src/its/CMakeLists.txt b/subsys/secure_storage/src/its/CMakeLists.txt index 90340047ff5..ddb0a0265ce 100644 --- a/subsys/secure_storage/src/its/CMakeLists.txt +++ b/subsys/secure_storage/src/its/CMakeLists.txt @@ -30,3 +30,9 @@ zephyr_library_sources_ifdef(CONFIG_SECURE_STORAGE_ITS_STORE_IMPLEMENTATION_ZMS zephyr_library_sources_ifdef(CONFIG_SECURE_STORAGE_ITS_STORE_IMPLEMENTATION_SETTINGS store/settings.c ) +if (CONFIG_SECURE_STORAGE_ITS_STORE_IMPLEMENTATION_NONE) + message(ERROR " + The secure storage ITS module is enabled but has no implementation. + (CONFIG_SECURE_STORAGE_ITS_STORE_IMPLEMENTATION_NONE) + ") +endif()