summaryrefslogtreecommitdiff
path: root/zephyr/test/hooks/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/test/hooks/CMakeLists.txt')
-rw-r--r--zephyr/test/hooks/CMakeLists.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/zephyr/test/hooks/CMakeLists.txt b/zephyr/test/hooks/CMakeLists.txt
index 9c6f0058fe..1347a8f75f 100644
--- a/zephyr/test/hooks/CMakeLists.txt
+++ b/zephyr/test/hooks/CMakeLists.txt
@@ -3,7 +3,25 @@
# found in the LICENSE file.
cmake_minimum_required(VERSION 3.13.1)
+set(BOARD native_posix)
project(hooks)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
+# Need to ensure that we are including only zephyr definitions in include files
+# We cannot set these via kconfig, since this unit test does not bring in the
+# zephyr-chrome repository
+zephyr_compile_definitions("CONFIG_ZEPHYR")
+zephyr_compile_definitions("CONFIG_PLATFORM_EC_HOOKS")
+
+# We need to include the EC include directory and this local test directory
+# for the task defines
+zephyr_include_directories(
+ "${PLATFORM_EC}/zephyr/shim/include"
+ "${PLATFORM_EC}/fuzz"
+ "${PLATFORM_EC}/test"
+ "${PLATFORM_EC}/include")
+
+# Include test file, test under test and console dependency
target_sources(app PRIVATE hooks.c)
+target_sources(app PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../../shim/src/hooks.c")
+target_sources(app PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../../shim/src/console.c")