aboutsummaryrefslogtreecommitdiff
path: root/deployments/component-test/arm-linux/CMakeLists.txt
blob: a0ad971f7f99f2410dea8db7e43b6d0b8a063857 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#-------------------------------------------------------------------------------
# Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
#-------------------------------------------------------------------------------
cmake_minimum_required(VERSION 3.16)
include(../../deployment.cmake REQUIRED)

#-------------------------------------------------------------------------------
#  The CMakeLists.txt for building the component-test deployment for arm-linux
#
#  Used for building and running component level tests as a Linux userspace
#  program running on Arm. Tests can be run by running the built executable
#  called "component-test"
#-------------------------------------------------------------------------------
include(${TS_ROOT}/environments/arm-linux/env.cmake)
project(trusted-services LANGUAGES CXX C)
add_executable(component-test)
target_include_directories(component-test PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}")

add_components(
	TARGET "component-test"
	BASE_DIR ${TS_ROOT}
	COMPONENTS   "components/app/test-runner"
)

include(${TS_ROOT}/external/CppUTest/CppUTest.cmake)
target_link_libraries(component-test PRIVATE CppUTest)

#-------------------------------------------------------------------------------
#  Components that are specific to deployment in the arm-linux environment.
#
#-------------------------------------------------------------------------------
add_components(
	TARGET "component-test"
	BASE_DIR ${TS_ROOT}
    COMPONENTS
        "components/service/crypto/provider/mbedcrypto/entropy_adapter/linux"
)

#-------------------------------------------------------------------------------
#  Extend with components that are common across all deployments of
#  component-test
#
#-------------------------------------------------------------------------------
include(../component-test.cmake REQUIRED)

#-------------------------------------------------------------------------------
#  Define library options and dependencies.
#
#-------------------------------------------------------------------------------
env_set_link_options(TGT component-test)
target_link_libraries(component-test PRIVATE stdc++ gcc m)