mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-26 06:30:51 -04:00
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 <ronald.cron@arm.com>
This commit is contained in:
parent
a9219ff73d
commit
2609fe9155
@ -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)
|
||||
|
@ -293,7 +293,7 @@ function(add_test_suite suite_name)
|
||||
)
|
||||
|
||||
add_executable(test_suite_${data_name} test_suite_${data_name}.c
|
||||
$<TARGET_OBJECTS:mbedtls_test>)
|
||||
$<TARGET_OBJECTS:tf_psa_crypto_test>)
|
||||
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})
|
||||
|
Loading…
x
Reference in New Issue
Block a user