Skip to content

Commit

Permalink
libsel4bench: add sanity check for configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Heider <[email protected]>
  • Loading branch information
axel-h committed Apr 12, 2024
1 parent 0095212 commit 9a7970f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions libsel4bench/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ cmake_minimum_required(VERSION 3.7.2)

project(libsel4bench C)

# Do a fail-safe check that all required configuration variables are set up
set(CHECK_CFG_VARS "KernelArch;KernelSel4Arch;KernelWordSize")
if(KernelArchARM)
list(APPEND CHECK_CFG_VARS "KernelArmArmV;KernelArmCPU")
endif()
foreach(cfg_var IN LISTS CHECK_CFG_VARS)
if((NOT DEFINED ${cfg_var}) OR (NOT ${cfg_var}))
message(FATAL "${PROJECT_NAME} requires setting ${cfg_var}")
endif()
message("${PROJECT_NAME} ${cfg_var}: ${${cfg_var}}")
endforeach()

add_library(sel4bench EXCLUDE_FROM_ALL)

target_sources(
Expand Down

0 comments on commit 9a7970f

Please sign in to comment.