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 <chensheng0802@outlook.com> Change-Id: I8d2f27382e77f3f914d490ba7836364a99ca67d7
diff --git a/CMakeLists.txt b/CMakeLists.txt index a3b3bec..9b8b7a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -30,12 +30,13 @@ 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()