blob: 64b5bcfbd264e167bcf1a15ad259c3fe8f8cd273 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#[============================================================================[
# Configure the generic settings for the kernel image.
#
# All the settings (e.g. include paths, linker flags, etc.) applied in this
# directly, are expected to be platform independent.
#]============================================================================]
add_executable("kernel")
target_compile_features("kernel" PRIVATE
"cxx_std_20"
)
target_compile_options("kernel" PRIVATE
"$<$<CXX_COMPILER_ID:GNU>:-Wall>"
"$<$<CXX_COMPILER_ID:GNU>:-Wextra>"
"$<$<CXX_COMPILER_ID:GNU>:-Werror>"
"$<$<CXX_COMPILER_ID:GNU>:-pedantic-errors>"
)
set_target_properties("kernel" PROPERTIES
CXX_EXTENSIONS OFF
CXX_STANDARD_REQUIRED YES
)
#[============================================================================[
# Apply the platform dependent settings to the kernel image.
#]============================================================================]
add_subdirectory("arch/${CMAKE_SYSTEM_PROCESSOR}")
|