CMake: Add KernelIsMCS option

This switches between master and mcs configurations.
This also adds a build system variable KernelPlatformSupportsMCS that
can be used to error on platforms that don't support MCS due to
unimplemented functionality.
This commit is contained in:
Kent McLeod
2019-08-01 18:26:52 +10:00
committed by Kent Mcleod
parent 940b43b767
commit caad010a09
2 changed files with 16 additions and 2 deletions

View File

@@ -14,8 +14,17 @@ cmake_minimum_required(VERSION 3.7.2)
set(configure_string "${config_configure_string}")
# Set kernel branch
config_set(KernelIsMaster KERNEL_MASTER ON)
config_option(
KernelIsMCS KERNEL_MCS "Use the MCS kernel configuration, which is not verified."
DEFAULT OFF
)
# Error for unsupported MCS platforms
if(KernelIsMCS AND (NOT KernelPlatformSupportsMCS))
message(
FATAL_ERROR "KernelIsMCS selected, but platform: ${KernelPlatform} does not support it."
)
endif()
# Proof based configuration variables
set(CSPEC_DIR "." CACHE PATH "")