Javier Almansa Sobrino | c4ad5b0 | 2022-07-05 19:05:14 +0100 | [diff] [blame^] | 1 | # |
| 2 | # SPDX-License-Identifier: BSD-3-Clause |
| 3 | # SPDX-FileCopyrightText: Copyright TF-RMM Contributors. |
| 4 | # |
| 5 | |
| 6 | add_library(rmm-plat-host_test) |
| 7 | |
| 8 | # host_test builds unittests for RMM |
| 9 | arm_config_option( |
| 10 | NAME RMM_UNITTESTS |
| 11 | HELP "Enable Unitests for the build" |
| 12 | DEFAULT "ON" |
| 13 | TYPE INTERNAL) |
| 14 | |
| 15 | target_link_libraries(rmm-plat-host_test |
| 16 | PRIVATE rmm-lib |
| 17 | CppUTest |
| 18 | # Needed to export host_utils.h |
| 19 | PUBLIC rmm-host-common) |
| 20 | |
| 21 | # Used to locate test_groups.h |
| 22 | target_include_directories(rmm-plat-host_test |
| 23 | PRIVATE "${CMAKE_BINARY_DIR}/plat/host/${HOST_VARIANT}/src") |
| 24 | |
| 25 | target_include_directories(rmm-plat-host_test |
| 26 | PUBLIC "include") |
| 27 | |
| 28 | target_sources(rmm-plat-host_test |
| 29 | PRIVATE "src/test_main.cpp" |
| 30 | "src/host_harness.c" |
| 31 | "src/test_helpers.c") |
| 32 | |
| 33 | add_library(rmm-platform ALIAS rmm-plat-host_test) |