apio
a164dcc160
All checks were successful
continuous-integration/drone/push Build is passing
libluna but for stuff that interests only userspace, like an argument parser or files or stuff like that.
28 lines
1.1 KiB
CMake
28 lines
1.1 KiB
CMake
# The C++ standard library for OS operations (userspace only), so most things that have to do with calling the kernel, or functions that the kernel has no use for.
|
|
|
|
file(GLOB HEADERS include/os/*.h)
|
|
|
|
set(SOURCES
|
|
${HEADERS}
|
|
src/ArgumentParser.cpp
|
|
)
|
|
|
|
add_library(os ${SOURCES})
|
|
target_compile_options(os PRIVATE -Os -Wall -Wextra -Werror -Wvla)
|
|
target_compile_options(os PRIVATE -Wdisabled-optimization -Wformat=2 -Winit-self)
|
|
target_compile_options(os PRIVATE -Wmissing-include-dirs -Wswitch-default -Wcast-qual -Wundef)
|
|
target_compile_options(os PRIVATE -Wcast-align -Wwrite-strings -Wlogical-op -Wredundant-decls -Wshadow -Wconversion)
|
|
target_compile_options(os PRIVATE -fno-asynchronous-unwind-tables -fno-omit-frame-pointer -std=c++20 -fno-rtti -fno-exceptions)
|
|
target_include_directories(os PUBLIC include/)
|
|
target_include_directories(os PUBLIC ${LUNA_BASE}/usr/include)
|
|
|
|
if("${LUNA_ARCH}" MATCHES "x86_64")
|
|
target_compile_definitions(os PUBLIC ARCH_X86_64)
|
|
endif()
|
|
|
|
if(LUNA_DEBUG_SYMBOLS)
|
|
message(STATUS "Building libOS with debug symbols")
|
|
target_compile_options(os PRIVATE -ggdb)
|
|
target_compile_options(os-freestanding PRIVATE -ggdb)
|
|
endif()
|