From 2609fe915560b8d857906524a47b65aee92a5caa Mon Sep 17 00:00:00 2001 From: Ronald Cron Date: Mon, 7 Oct 2024 09:58:57 +0200 Subject: [PATCH] cmake: tf-psa-crypto: Rename mbedtls_test to tf_psa_crypto_test To avoid conflict between the two targets when the integration of the TF-PSA-Crypto cmake build system into the Mbed TLS one is completed. Signed-off-by: Ronald Cron --- tf-psa-crypto/TF-PSA-Crypto.cmake | 22 +++++++++++----------- tf-psa-crypto/tests/CMakeLists.txt | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tf-psa-crypto/TF-PSA-Crypto.cmake b/tf-psa-crypto/TF-PSA-Crypto.cmake index 3b06641ba..6cbf20b36 100644 --- a/tf-psa-crypto/TF-PSA-Crypto.cmake +++ b/tf-psa-crypto/TF-PSA-Crypto.cmake @@ -342,16 +342,16 @@ add_subdirectory(pkgconfig) # library and that there is as of today no portable way of handling such # dependencies (only toolchain specific solutions). # -# Thus the below definition of the `mbedtls_test` CMake library of objects -# target. This library of objects is used by tests and programs CMake files -# to define the test executables. +# Thus the below definition of the `tf_psa_crypto_test` CMake library of +# objects target. This library of objects is used by tests and programs CMake +# files to define the test executables. # if(ENABLE_TESTING OR ENABLE_PROGRAMS) file(GLOB MBEDTLS_TEST_FILES ${MBEDTLS_DIR}/tests/src/*.c ${MBEDTLS_DIR}/tests/src/drivers/*.c) - add_library(mbedtls_test OBJECT ${MBEDTLS_TEST_FILES}) - set_base_compile_options(mbedtls_test) + add_library(tf_psa_crypto_test OBJECT ${MBEDTLS_TEST_FILES}) + set_base_compile_options(tf_psa_crypto_test) if(GEN_FILES) add_custom_command( OUTPUT @@ -366,7 +366,7 @@ if(ENABLE_TESTING OR ENABLE_PROGRAMS) DEPENDS ${MBEDTLS_FRAMEWORK_DIR}/scripts/generate_test_keys.py ) - add_custom_target(test_keys_header DEPENDS ${MBEDTLS_DIR}/tests/src/test_keys.h) + add_custom_target(tf_psa_crypto_test_keys_header DEPENDS ${MBEDTLS_DIR}/tests/src/test_keys.h) add_custom_command( OUTPUT @@ -381,10 +381,10 @@ if(ENABLE_TESTING OR ENABLE_PROGRAMS) DEPENDS ${MBEDTLS_FRAMEWORK_DIR}/scripts/generate_test_cert_macros.py ) - add_custom_target(test_certs_header DEPENDS ${MBEDTLS_DIR}/tests/src/test_certs.h) - add_dependencies(mbedtls_test test_keys_header test_certs_header) + add_custom_target(tf_psa_crypto_test_certs_header DEPENDS ${MBEDTLS_DIR}/tests/src/test_certs.h) + add_dependencies(tf_psa_crypto_test tf_psa_crypto_test_keys_header tf_psa_crypto_test_certs_header) endif() - target_include_directories(mbedtls_test + target_include_directories(tf_psa_crypto_test PRIVATE ${MBEDTLS_DIR}/tests/include PRIVATE ${MBEDTLS_DIR}/include PRIVATE include @@ -392,8 +392,8 @@ if(ENABLE_TESTING OR ENABLE_PROGRAMS) PRIVATE core PRIVATE drivers/builtin/src) # Request C11, needed for memory poisoning tests - set_target_properties(mbedtls_test PROPERTIES C_STANDARD 11) - set_config_files_compile_definitions(mbedtls_test) + set_target_properties(tf_psa_crypto_test PROPERTIES C_STANDARD 11) + set_config_files_compile_definitions(tf_psa_crypto_test) endif() if(ENABLE_PROGRAMS) diff --git a/tf-psa-crypto/tests/CMakeLists.txt b/tf-psa-crypto/tests/CMakeLists.txt index 0793dbe35..bc5f11def 100644 --- a/tf-psa-crypto/tests/CMakeLists.txt +++ b/tf-psa-crypto/tests/CMakeLists.txt @@ -293,7 +293,7 @@ function(add_test_suite suite_name) ) add_executable(test_suite_${data_name} test_suite_${data_name}.c - $) + $) set_base_compile_options(test_suite_${data_name}) target_compile_options(test_suite_${data_name} PRIVATE ${TEST_C_FLAGS}) add_dependencies(test_suite_${data_name} ${dependency})