forked from Imagelibrary/seL4
cmake: Only include cmake files for selected arch
This prevents accidental declaration of properties or configurations that are for the incorrect architecture selected. This was previously required as the variables KernelWordSize and KernelArch were defined in each arch specific cmake.config file. Now that they are defined in advance it is possible to exclude the other imports.
This commit is contained in:
@@ -98,12 +98,8 @@ endif()
|
||||
set(KernelHaveFPU OFF)
|
||||
set(KernelSetTLSBaseSelf OFF)
|
||||
|
||||
include(src/arch/arm/config.cmake)
|
||||
include(src/arch/riscv/config.cmake)
|
||||
include(src/arch/x86/config.cmake)
|
||||
|
||||
include(include/32/mode/config.cmake)
|
||||
include(include/64/mode/config.cmake)
|
||||
include(src/arch/${KernelArch}/config.cmake)
|
||||
include(include/${KernelWordSize}/mode/config.cmake)
|
||||
include(src/config.cmake)
|
||||
|
||||
if(DEFINED KernelDTSList AND (NOT "${KernelDTSList}" STREQUAL ""))
|
||||
|
||||
@@ -236,5 +236,4 @@ add_sources(
|
||||
|
||||
add_bf_source_old("KernelArchARM" "structures.bf" "include/arch/arm" "arch/object")
|
||||
|
||||
include(src/arch/arm/32/config.cmake)
|
||||
include(src/arch/arm/64/config.cmake)
|
||||
include(src/arch/arm/${KernelWordSize}/config.cmake)
|
||||
|
||||
@@ -379,5 +379,4 @@ add_sources(DEP "KernelArchX86;KernelDebugBuild" CFILES src/arch/x86/machine/cap
|
||||
|
||||
add_bf_source_old("KernelArchX86" "structures.bf" "include/arch/x86" "arch/object")
|
||||
|
||||
include(src/arch/x86/32/config.cmake)
|
||||
include(src/arch/x86/64/config.cmake)
|
||||
include(src/arch/x86/${KernelWordSize}/config.cmake)
|
||||
|
||||
Reference in New Issue
Block a user