From 11e2df8efcd5e181287ad47b15ea06d99e5bb616 Mon Sep 17 00:00:00 2001 From: jinran-google Date: Fri, 25 Mar 2022 06:37:46 +0800 Subject: [PATCH] [cmake] add option to enable secure settings API (#7517) This commit adds an option to the POSIX platform CMake module to turn on/off the secure settings API. --- src/posix/platform/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/posix/platform/CMakeLists.txt b/src/posix/platform/CMakeLists.txt index 6ba5e3245..272b08e2d 100644 --- a/src/posix/platform/CMakeLists.txt +++ b/src/posix/platform/CMakeLists.txt @@ -62,6 +62,13 @@ if(OT_POSIX_MAX_POWER_TABLE) ) endif() +option(OT_POSIX_SECURE_SETTINGS "enable secure settings" OFF) +if (OT_POSIX_SECURE_SETTINGS) + target_compile_definitions(ot-posix-config + INTERFACE "OPENTHREAD_POSIX_CONFIG_SECURE_SETTINGS_ENABLE=1" + ) +endif() + set(OT_POSIX_CONFIG_RCP_BUS "" CACHE STRING "RCP bus type") if(OT_POSIX_CONFIG_RCP_BUS) target_compile_definitions(ot-posix-config