1#
2# Copyright 2017, Data61
3# Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4# ABN 41 687 119 230.
5#
6# This software may be distributed and modified according to the terms of
7# the BSD 2-Clause license. Note that NO WARRANTY is provided.
8# See "LICENSE_BSD2.txt" for details.
9#
10# @TAG(DATA61_BSD)
11#
12
13cmake_minimum_required(VERSION 3.7.2)
14
15project(sel4test-tests C CXX)
16
17# Use arm arch source files on RISCV
18set(arch ${KernelArch})
19if(KernelArchRiscV)
20    set(arch arm)
21endif()
22
23file(
24    GLOB
25        deps
26        src/*.c
27        src/tests/*.c
28        src/tests/*.S
29        src/arch/${arch}/*.c
30        src/arch/${KernelArch}/tests/*.c
31        src/*.cxx
32        src/tests/*.cxx
33        src/arch/${KernelArch}/tests/*.S
34)
35
36add_executable(sel4test-tests EXCLUDE_FROM_ALL ${deps})
37target_include_directories(
38    sel4test-tests
39    PRIVATE include arch/${KernelArch} sel4_arch/${KernelSel4Arch}
40)
41
42target_link_libraries(
43    sel4test-tests
44    PUBLIC
45        sel4_autoconf
46        muslc
47        sel4
48        sel4runtime
49        sel4allocman
50        sel4vka
51        sel4utils
52        sel4rpc
53        sel4test
54        sel4sync
55        sel4muslcsys
56        sel4testsupport
57        sel4serialserver_tests
58    PRIVATE sel4test-driver_Config
59)
60