summaryrefslogtreecommitdiff
path: root/zephyr/test/system_shim/CMakeLists.txt
blob: 92b55a47e6c1e3527c8e58d33289b228052d1ca6 (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
# Copyright 2020 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

cmake_minimum_required(VERSION 3.13.1)
find_package(Zephyr REQUIRED HINTS "${ZEPHYR_BASE}")
project(system_shim_test)

# Include FFF fakes
add_subdirectory(${PLATFORM_EC}/zephyr/test/test_utils test_utils)

target_sources(app
  PRIVATE
    src/suite.c
    ${PLATFORM_EC}/zephyr/shim/src/system.c
)
target_include_directories(app PRIVATE include)

dt_has_chosen(has_bbram PROPERTY "cros-ec,bbram")
if(has_bbram)
  target_sources(app PRIVATE src/test_system.c)
else()
  target_sources(app PRIVATE src/no_chosen.c)
endif()