Skip to content

Commit

Permalink
cmake: use flags instead of strings
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Heider <[email protected]>
  • Loading branch information
axel-h committed Jun 2, 2022
1 parent 812c0c2 commit 41a219c
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,14 @@ set_property(
# These options are now set in seL4Config.cmake
if(DEFINED CALLED_declare_default_headers)
# calculate the irq cnode size based on MAX_NUM_IRQ
if("${KernelArch}" STREQUAL "riscv")
if(KernelArchRiscV)
math(EXPR MAX_NUM_IRQ "${CONFIGURE_PLIC_MAX_NUM_INT} + 2")
else()
if(
DEFINED KernelMaxNumNodes
AND CONFIGURE_NUM_PPI GREATER "0"
AND "${KernelArch}" STREQUAL "arm"
elseif(KernelArchARM AND KernelEnableSMPSupport AND (CONFIGURE_NUM_PPI GREATER "0"))
math(
EXPR MAX_NUM_IRQ "(${KernelMaxNumNodes}-1)*${CONFIGURE_NUM_PPI} + ${CONFIGURE_MAX_IRQ}"
)
math(
EXPR MAX_NUM_IRQ
"(${KernelMaxNumNodes}-1)*${CONFIGURE_NUM_PPI} + ${CONFIGURE_MAX_IRQ}"
)
else()
set(MAX_NUM_IRQ "${CONFIGURE_MAX_IRQ}")
endif()
else()
set(MAX_NUM_IRQ "${CONFIGURE_MAX_IRQ}")
endif()
set(BITS "0")
while(MAX_NUM_IRQ GREATER "0")
Expand Down

0 comments on commit 41a219c

Please sign in to comment.