From 5a81a5d9443807c42cbe147e754f970014c4bb12 Mon Sep 17 00:00:00 2001 From: Axel Heider Date: Fri, 5 May 2023 15:24:16 +0200 Subject: [PATCH] CMake: fail for unsupported platforms Signed-off-by: Axel Heider --- apps/Arm/vm_cross_connector/CMakeLists.txt | 2 ++ apps/Arm/vm_introspect/CMakeLists.txt | 2 ++ apps/Arm/vm_minimal/CMakeLists.txt | 3 +++ apps/Arm/vm_multi/CMakeLists.txt | 2 ++ apps/Arm/vm_virtio_net/CMakeLists.txt | 3 +++ 5 files changed, 12 insertions(+) diff --git a/apps/Arm/vm_cross_connector/CMakeLists.txt b/apps/Arm/vm_cross_connector/CMakeLists.txt index 24864ed3..071fee89 100644 --- a/apps/Arm/vm_cross_connector/CMakeLists.txt +++ b/apps/Arm/vm_cross_connector/CMakeLists.txt @@ -35,6 +35,8 @@ elseif(KernelPlatformQEMUArmVirt) if(SIMULATION) GenerateSimulateScript() endif() +else() + message(FATAL_ERROR "unsupported platform") endif() AddToFileServer("linux" "${CAMKES_VM_IMAGES_DIR}/${KernelARMPlatform}/linux") diff --git a/apps/Arm/vm_introspect/CMakeLists.txt b/apps/Arm/vm_introspect/CMakeLists.txt index 5563d6db..51fce813 100644 --- a/apps/Arm/vm_introspect/CMakeLists.txt +++ b/apps/Arm/vm_introspect/CMakeLists.txt @@ -52,6 +52,8 @@ elseif(KernelPlatformQEMUArmVirt) GenerateSimulateScript() endif() +else() + message(FATAL_ERROR "unsupported platform") endif() AddToFileServer("linux" "${CAMKES_VM_IMAGES_DIR}/${KernelARMPlatform}/linux") diff --git a/apps/Arm/vm_minimal/CMakeLists.txt b/apps/Arm/vm_minimal/CMakeLists.txt index 43255b2d..2c38ffcc 100644 --- a/apps/Arm/vm_minimal/CMakeLists.txt +++ b/apps/Arm/vm_minimal/CMakeLists.txt @@ -128,6 +128,9 @@ elseif(KernelPlatformOdroidc2) output_dtb_location ) AddToFileServer("linux-dtb" "${output_dtb_location}" DEPENDS dtb_gen_target) + +else() + message(FATAL_ERROR "unsupported platform") endif() AddCamkesCPPFlag(cpp_flags CONFIG_VARS VmEmmc2NoDMA VmVUSB Tk1DeviceFwd Tk1Insecure) diff --git a/apps/Arm/vm_multi/CMakeLists.txt b/apps/Arm/vm_multi/CMakeLists.txt index cfa4f15d..639580ea 100644 --- a/apps/Arm/vm_multi/CMakeLists.txt +++ b/apps/Arm/vm_multi/CMakeLists.txt @@ -22,6 +22,8 @@ elseif(KernelPlatformQEMUArmVirt) if(SIMULATION) GenerateSimulateScript() endif() +else() + message(FATAL_ERROR "unsupported platform") endif() # Generate our overlayed rootfs images diff --git a/apps/Arm/vm_virtio_net/CMakeLists.txt b/apps/Arm/vm_virtio_net/CMakeLists.txt index 66dbf272..30f31a6d 100644 --- a/apps/Arm/vm_virtio_net/CMakeLists.txt +++ b/apps/Arm/vm_virtio_net/CMakeLists.txt @@ -26,6 +26,9 @@ elseif(KernelPlatformTx2) set(rootfs_address "0xf7000000") set(dtb_file "${CAMKES_VM_IMAGES_DIR}/${KernelARMPlatform}/linux-pci-dtb") set(rootfs_file "${CAMKES_VM_IMAGES_DIR}/${KernelARMPlatform}/rootfs_crossvm.cpio.gz") + +else() + message(FATAL_ERROR "unsupported platform") endif() # Generate overlayed rootfs