From ecaf2089a3ab8c3daf895e16fee0b95c9a316c05 Mon Sep 17 00:00:00 2001 From: ichdream Date: Thu, 10 Mar 2022 13:45:11 +0800 Subject: [PATCH] cmake: create script only if SIMULATION is enabled The simulation scripts are useless if the target is a real board and not a QEMU simulation. Thus they will only be created if SIMULATION is explicitly ON (-DSIMULATION=TRUE). SIMULATION is disabled by default Signed-off-by: ichdream --- CMakeLists.txt | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a3b3becc..9b8b7a1b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,12 +30,13 @@ elfloader_import_project() add_subdirectory(apps/sel4test-driver) -include(simulation) -if(KernelSel4ArchX86_64) - SetSimulationScriptProperty(MEM_SIZE "3G") +if(SIMULATION) + include(simulation) + if(KernelSel4ArchX86_64) + SetSimulationScriptProperty(MEM_SIZE "3G") + endif() + if(KernelPlatformQEMUArmVirt) + SetSimulationScriptProperty(MEM_SIZE "2G") + endif() + GenerateSimulateScript() endif() -if(KernelPlatformQEMUArmVirt) - SetSimulationScriptProperty(MEM_SIZE "2G") -endif() - -GenerateSimulateScript()