blob: d96a793a307400b85f8b1ebf206bca01d289dd5e [file] [log] [blame]
Julian Halleff4b282020-11-23 18:24:12 +01001#-------------------------------------------------------------------------------
2# Copyright (c) 2020, Arm Limited and Contributors. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6#-------------------------------------------------------------------------------
7cmake_minimum_required(VERSION 3.16)
8include(../../deployment.cmake REQUIRED)
9
10#-------------------------------------------------------------------------------
11# The CMakeLists.txt for building the component-test deployment for arm-linux
12#
13# Used for building and running component level tests as a Linux userspace
14# program running on Arm. Tests can be run by running the built executable
15# called "component-test"
16#-------------------------------------------------------------------------------
17include(${TS_ROOT}/environments/arm-linux/env.cmake)
18project(trusted-services LANGUAGES CXX C)
19add_executable(component-test)
20target_include_directories(component-test PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}")
21
Imre Kis7cbf6a22021-01-25 18:50:35 +010022add_components(
23 TARGET "component-test"
24 BASE_DIR ${TS_ROOT}
25 COMPONENTS "components/app/test-runner"
26)
27
28include(${TS_ROOT}/external/CppUTest/CppUTest.cmake)
29target_link_libraries(component-test PRIVATE CppUTest)
30
Julian Halleff4b282020-11-23 18:24:12 +010031#-------------------------------------------------------------------------------
32# Extend with components that are common across all deployments of
33# component-test
34#
35#-------------------------------------------------------------------------------
36include(../component-test.cmake REQUIRED)
37
38#-------------------------------------------------------------------------------
39# Define library options and dependencies.
40#
41#-------------------------------------------------------------------------------
42env_set_link_options(TGT component-test)
43target_link_libraries(component-test PRIVATE stdc++ gcc m)