diff options
author | Julian Hall <julian.hall@arm.com> | 2021-08-06 15:21:21 +0100 |
---|---|---|
committer | Gyorgy Szing <Gyorgy.Szing@arm.com> | 2021-10-06 00:49:00 +0200 |
commit | c1f8b6e628d863d8160c18bfe7760704fb5fa612 (patch) | |
tree | e762a817fa17c28ccf898de3c37a25e648dc35e3 | |
parent | 628be296309810556f76e771a3134df9cc359d26 (diff) | |
download | trusted-services-c1f8b6e628d863d8160c18bfe7760704fb5fa612.tar.gz |
Fix passing of multiple defines to psa_arch_tests
Fixes problem with passing multiple preprocessor defines into
the psa_arch_tests external component via its cmake
interface.
Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: Ic21bce0846a447cb786bb7ea0c4ef9dab1c13218
-rw-r--r-- | deployments/psa-api-test/crypto/crypto-api-test.cmake | 5 | ||||
-rw-r--r-- | deployments/psa-api-test/initial_attestation/iat-api-test.cmake | 5 | ||||
-rw-r--r-- | external/psa_arch_tests/psa_arch_tests.cmake | 5 |
3 files changed, 8 insertions, 7 deletions
diff --git a/deployments/psa-api-test/crypto/crypto-api-test.cmake b/deployments/psa-api-test/crypto/crypto-api-test.cmake index aecf79167..558d0578c 100644 --- a/deployments/psa-api-test/crypto/crypto-api-test.cmake +++ b/deployments/psa-api-test/crypto/crypto-api-test.cmake @@ -15,9 +15,8 @@ set(TS_ARCH_TEST_SUITE CRYPTO CACHE STRING "Arch test suite") # Extend the arch test build configuration to include tests missing from the # default configuration. #------------------------------------------------------------------------------- -set(TS_ARCH_TEST_EXTERNAL_DEFS - -DCRYPTO_1_0 - CACHE STRING "Arch test external defines") +list(APPEND PSA_ARCH_TEST_EXTERNAL_DEFS + -DCRYPTO_1_0) #------------------------------------------------------------------------------- # The arch test build system puts its build output under a test suite specific diff --git a/deployments/psa-api-test/initial_attestation/iat-api-test.cmake b/deployments/psa-api-test/initial_attestation/iat-api-test.cmake index 55ecd4ada..5486075df 100644 --- a/deployments/psa-api-test/initial_attestation/iat-api-test.cmake +++ b/deployments/psa-api-test/initial_attestation/iat-api-test.cmake @@ -14,9 +14,8 @@ set(TS_ARCH_TEST_SUITE INITIAL_ATTESTATION CACHE STRING "Arch test suite") #------------------------------------------------------------------------------- # Set additional defines needed for build. #------------------------------------------------------------------------------- -set(TS_ARCH_TEST_EXTERNAL_DEFS - -DPSA_ALG_MD4=0x02000002 - CACHE STRING "Arch test external defines") +list(APPEND PSA_ARCH_TEST_EXTERNAL_DEFS + -DPSA_ALG_MD4=0x02000002) #------------------------------------------------------------------------------- # The arch test build system puts its build output under a test suite specific diff --git a/external/psa_arch_tests/psa_arch_tests.cmake b/external/psa_arch_tests/psa_arch_tests.cmake index 2ab61eb76..e6ab73f7b 100644 --- a/external/psa_arch_tests/psa_arch_tests.cmake +++ b/external/psa_arch_tests/psa_arch_tests.cmake @@ -46,6 +46,9 @@ endif() # Ensure list of include paths is separated correctly string(REPLACE ";" "\\;" PSA_ARCH_TESTS_EXTERNAL_INCLUDE_PATHS "${PSA_ARCH_TESTS_EXTERNAL_INCLUDE_PATHS}") +# Ensure list of defines is separated correctly +string(REPLACE ";" " " PSA_ARCH_TEST_EXTERNAL_DEFS "${PSA_ARCH_TEST_EXTERNAL_DEFS}") + # Configure the psa-arch-test library execute_process(COMMAND ${CMAKE_COMMAND} @@ -53,7 +56,7 @@ execute_process(COMMAND -DCMAKE_TOOLCHAIN_FILE=${TS_EXTERNAL_LIB_TOOLCHAIN_FILE} -DPSA_INCLUDE_PATHS=${PSA_ARCH_TESTS_EXTERNAL_INCLUDE_PATHS} -DSUITE=${TS_ARCH_TEST_SUITE} - -DARCH_TEST_EXTERNAL_DEFS=${TS_ARCH_TEST_EXTERNAL_DEFS} + -DARCH_TEST_EXTERNAL_DEFS=${PSA_ARCH_TEST_EXTERNAL_DEFS} -DCMAKE_VERBOSE_MAKEFILE=OFF -DTARGET=tgt_dev_apis_linux -GUnix\ Makefiles |