From 925d2ca052e5aa372372e4898f73c97e3915c45b Mon Sep 17 00:00:00 2001 From: Tomi Fontanilles Date: Tue, 21 May 2024 13:51:55 +0300 Subject: [PATCH] modules: tf-m: fix unused CMake variable warning Define and pass down PSA_ARCH_TESTS_PATH only in the sample that needs it (tfm_psa_test). Otherwise, it provokes a CMake warning because the variable does not get used in TF-M. Signed-off-by: Tomi Fontanilles --- modules/trusted-firmware-m/CMakeLists.txt | 3 --- samples/tfm_integration/tfm_psa_test/CMakeLists.txt | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/trusted-firmware-m/CMakeLists.txt b/modules/trusted-firmware-m/CMakeLists.txt index bd95d785710..f3bfc574cc0 100644 --- a/modules/trusted-firmware-m/CMakeLists.txt +++ b/modules/trusted-firmware-m/CMakeLists.txt @@ -135,8 +135,6 @@ if (CONFIG_BUILD_WITH_TFM) set(TFM_BINARY_DIR ${CMAKE_BINARY_DIR}/tfm) - set(PSA_ARCH_TESTS_PATH ${ZEPHYR_CURRENT_MODULE_DIR}/../psa-arch-tests) - set(TFM_INTERFACE_SOURCE_DIR ${TFM_BINARY_DIR}/api_ns/interface/src) set(TFM_INTERFACE_INCLUDE_DIR ${TFM_BINARY_DIR}/api_ns/interface/include) set(TFM_INTERFACE_LIB_DIR ${TFM_BINARY_DIR}/api_ns/interface/lib) @@ -248,7 +246,6 @@ if (CONFIG_BUILD_WITH_TFM) ${TFM_CMAKE_ARGS} $> -DMBEDCRYPTO_PATH=$>,$,${ZEPHYR_MBEDTLS_MODULE_DIR}> - -DPSA_ARCH_TESTS_PATH=${PSA_ARCH_TESTS_PATH} ${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR} WORKING_DIRECTORY ${TFM_BINARY_DIR} COMMAND_EXPAND_LISTS diff --git a/samples/tfm_integration/tfm_psa_test/CMakeLists.txt b/samples/tfm_integration/tfm_psa_test/CMakeLists.txt index a46893a98e5..f195f0d79d0 100644 --- a/samples/tfm_integration/tfm_psa_test/CMakeLists.txt +++ b/samples/tfm_integration/tfm_psa_test/CMakeLists.txt @@ -22,7 +22,7 @@ get_target_property(TFM_TOOLCHAIN_PREFIX tfm TFM_TOOLCHAIN_PREFIX) get_target_property(TFM_TOOLCHAIN_NS_FILE tfm TFM_TOOLCHAIN_NS_FILE) set(TFM_TEST_REPO_PATH ${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/../tf-m-tests) -set(TFM_PSA_ARCHTEST_REPO_PATH ${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/../psa-arch-tests) +set(PSA_ARCH_TESTS_PATH ${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/../psa-arch-tests) if (CONFIG_TFM_PSA_TEST_INITIAL_ATTESTATION AND CONFIG_TFM_QCBOR_PATH STREQUAL "") # TODO: Remove this when QCBOR licensing issues w/t_cose have been resolved, @@ -56,7 +56,7 @@ set(TEST_PSA_API "${TFM_PSA_TEST_SUITE}") set_property(TARGET zephyr_property_target APPEND PROPERTY TFM_CMAKE_OPTIONS - -DPSA_ARCH_TESTS_PATH=${TFM_PSA_ARCHTEST_REPO_PATH} + -DPSA_ARCH_TESTS_PATH=${PSA_ARCH_TESTS_PATH} ) set_property(TARGET zephyr_property_target