blob: bc60f6ca3632c4ba92eca1b8e47a288472f5b018 (
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
|
#[============================================================================[
# 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_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
INTERPROCEDURAL_OPTIMIZATION YES
)
#[============================================================================[
# Apply the platform dependent settings to the kernel image.
#]============================================================================]
add_subdirectory("arch/${CMAKE_SYSTEM_PROCESSOR}")
|