Add common cmake config for psa-api-test deployments
To avoid duplication between different psa-api-test deployment build
files, a common cmake configuration file has been added that should be
included early on by all psa-api-test deployment CMakeLists.txt.
Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: I52a5ad10672ed68175a4a8058547369b7039f784
diff --git a/deployments/psa-api-test/crypto/arm-linux/CMakeLists.txt b/deployments/psa-api-test/crypto/arm-linux/CMakeLists.txt
index ea1b460..40384d6 100644
--- a/deployments/psa-api-test/crypto/arm-linux/CMakeLists.txt
+++ b/deployments/psa-api-test/crypto/arm-linux/CMakeLists.txt
@@ -6,6 +6,7 @@
#-------------------------------------------------------------------------------
cmake_minimum_required(VERSION 3.16)
include(../../../deployment.cmake REQUIRED)
+include(../../psa-api-test-config.cmake REQUIRED)
#-------------------------------------------------------------------------------
# The CMakeLists.txt for building the psa-api-test deployment for arm-linux
diff --git a/deployments/psa-api-test/crypto/linux-pc/CMakeLists.txt b/deployments/psa-api-test/crypto/linux-pc/CMakeLists.txt
index 1737976..bd6cc8f 100644
--- a/deployments/psa-api-test/crypto/linux-pc/CMakeLists.txt
+++ b/deployments/psa-api-test/crypto/linux-pc/CMakeLists.txt
@@ -6,13 +6,7 @@
#-------------------------------------------------------------------------------
cmake_minimum_required(VERSION 3.16)
include(../../../deployment.cmake REQUIRED)
-
-# Prevents symbols in the psa-api-test executable overriding symbols with
-# with same name in libts during dyanmic linking performed by the program
-# loader. This avoid psa crypto api symbols provided by the mbedcrypto
-# library from being overridden by the same symbols in the psa-api-test
-# executable.
-set(CMAKE_C_VISIBILITY_PRESET hidden)
+include(../../psa-api-test-config.cmake REQUIRED)
#-------------------------------------------------------------------------------
# The CMakeLists.txt for building the psa-api-test deployment for linux-pc
diff --git a/deployments/psa-api-test/initial_attestation/linux-pc/CMakeLists.txt b/deployments/psa-api-test/initial_attestation/linux-pc/CMakeLists.txt
index a710924..5da59fa 100644
--- a/deployments/psa-api-test/initial_attestation/linux-pc/CMakeLists.txt
+++ b/deployments/psa-api-test/initial_attestation/linux-pc/CMakeLists.txt
@@ -6,6 +6,7 @@
#-------------------------------------------------------------------------------
cmake_minimum_required(VERSION 3.16)
include(../../../deployment.cmake REQUIRED)
+include(../../psa-api-test-config.cmake REQUIRED)
#-------------------------------------------------------------------------------
# The CMakeLists.txt for building the psa-api-test deployment for linux-pc
diff --git a/deployments/psa-api-test/psa-api-test-config.cmake b/deployments/psa-api-test/psa-api-test-config.cmake
new file mode 100644
index 0000000..450eb18
--- /dev/null
+++ b/deployments/psa-api-test/psa-api-test-config.cmake
@@ -0,0 +1,17 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+
+#-------------------------------------------------------------------------------
+# Common build configuration for all psa-api-test deployments.
+#-------------------------------------------------------------------------------
+
+# Prevents symbols in the psa-api-test executable overriding symbols with
+# with same name in libts during dyanmic linking performed by the program
+# loader. This avoid psa crypto api symbols provided by the mbedcrypto
+# library from being overridden by the same symbols in the psa-api-test
+# executable.
+set(CMAKE_C_VISIBILITY_PRESET hidden)