1# SPDX-License-Identifier: Apache-2.0
2
3cmake_minimum_required(VERSION 3.20.0)
4find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
5project(interrupt)
6
7target_include_directories(app PRIVATE
8  ${ZEPHYR_BASE}/kernel/include
9  ${ZEPHYR_BASE}/arch/${ARCH}/include
10  )
11
12target_sources(app PRIVATE
13    src/prevent_irq.c
14    src/interrupt_offload.c
15    src/nested_irq.c
16    )
17
18target_sources_ifdef(CONFIG_DYNAMIC_INTERRUPTS app PRIVATE src/dynamic_isr.c)
19target_sources_ifdef(CONFIG_X86 app PRIVATE src/regular_isr.c)
20target_sources_ifdef(CONFIG_SHARED_INTERRUPTS app PRIVATE src/static_shared_irq.c)
21
22if (CONFIG_SHARED_INTERRUPTS)
23target_sources_ifdef(CONFIG_DYNAMIC_INTERRUPTS app PRIVATE src/dynamic_shared_irq.c)
24endif()
25