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  ${ZEPHYR_BASE}/arch/common/include
11  )
12
13target_sources(app PRIVATE
14    src/prevent_irq.c
15    src/interrupt_offload.c
16    src/nested_irq.c
17    )
18
19target_sources_ifdef(CONFIG_DYNAMIC_INTERRUPTS app PRIVATE src/dynamic_isr.c)
20target_sources_ifdef(CONFIG_X86 app PRIVATE src/regular_isr.c)
21target_sources_ifdef(CONFIG_SHARED_INTERRUPTS app PRIVATE src/static_shared_irq.c)
22
23if (CONFIG_SHARED_INTERRUPTS)
24target_sources_ifdef(CONFIG_DYNAMIC_INTERRUPTS app PRIVATE src/dynamic_shared_irq.c)
25endif()
26
27if(CONFIG_MULTI_LEVEL_INTERRUPTS)
28  target_sources_ifdef(CONFIG_DYNAMIC_INTERRUPTS app PRIVATE src/sw_isr_table.c)
29  target_sources_ifdef(CONFIG_TEST_MULTILEVEL_IRQ app PRIVATE src/multilevel_irq.c)
30endif()
31