From a3b562aa1742fa46f7f3c3e268aae1f33bc77a3e Mon Sep 17 00:00:00 2001 From: Ronald Cron Date: Mon, 16 Jun 2025 15:21:13 +0200 Subject: [PATCH] programs: test: Let zeroize be an Mbed TLS test program In TF-PSA-Crypto there is the crypto specific one. Signed-off-by: Ronald Cron --- programs/test/CMakeLists.txt | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/programs/test/CMakeLists.txt b/programs/test/CMakeLists.txt index 089f8a67e8..949708420c 100644 --- a/programs/test/CMakeLists.txt +++ b/programs/test/CMakeLists.txt @@ -2,20 +2,16 @@ set(libs ${mbedtls_target} ) -set(executables_libs +set(executables metatest query_compile_time_config query_included_headers selftest udp_proxy -) -add_dependencies(${programs_target} ${executables_libs}) -add_dependencies(${ssl_opt_target} udp_proxy) - -set(executables_mbedcrypto zeroize ) -add_dependencies(${programs_target} ${executables_mbedcrypto}) +add_dependencies(${programs_target} ${executables}) +add_dependencies(${ssl_opt_target} udp_proxy) add_dependencies(${ssl_opt_target} query_compile_time_config) if(TEST_CPP) @@ -74,7 +70,7 @@ else() link_to_source(query_config.c) endif() -foreach(exe IN LISTS executables_libs executables_mbedcrypto) +foreach(exe IN LISTS executables) set(source ${exe}.c) set(extra_sources "") if(NOT EXISTS ${source} AND @@ -102,16 +98,9 @@ foreach(exe IN LISTS executables_libs executables_mbedcrypto) # Request C11, required for memory poisoning set_target_properties(${exe} PROPERTIES C_STANDARD 11) - - # This emulates "if ( ... IN_LIST ... )" which becomes available in CMake 3.3 - list(FIND executables_libs ${exe} exe_index) - if (${exe_index} GREATER -1) - target_link_libraries(${exe} ${libs} ${CMAKE_THREAD_LIBS_INIT}) - else() - target_link_libraries(${exe} ${tfpsacrypto_target} ${CMAKE_THREAD_LIBS_INIT}) - endif() + target_link_libraries(${exe} ${libs} ${CMAKE_THREAD_LIBS_INIT}) endforeach() -install(TARGETS ${executables_libs} ${executables_mbedcrypto} +install(TARGETS ${executables} DESTINATION "bin" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)