2023-05-17 20:20:53 -07:00
|
|
|
cmake_minimum_required(VERSION 3.2)
|
|
|
|
|
|
|
|
# Set because our cross compiler can't do dynamic linking?
|
|
|
|
set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")
|
|
|
|
|
|
|
|
project(AcadiaOS VERSION 0.0.1 LANGUAGES CXX ASM-ATT)
|
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
|
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS True)
|
|
|
|
|
2023-12-08 14:29:18 -08:00
|
|
|
set(BASE_COMPILE_FLAGS "-ffreestanding -fno-rtti -fno-exceptions -mincoming-stack-boundary=3")
|
2023-06-07 11:09:27 -07:00
|
|
|
set(BASE_LINK_FLAGS "-nostdlib")
|
|
|
|
|
2024-01-16 18:58:03 -08:00
|
|
|
if (enable_testing)
|
|
|
|
include(CTest)
|
|
|
|
find_package(Catch2 3 REQUIRED)
|
|
|
|
find_program(MEMORYCHECK_COMMAND valgrind)
|
|
|
|
set(MEMORYCHECK_COMMAND_OPTIONS "--trace-children=yes --leak-check=full")
|
|
|
|
add_custom_target(build_test)
|
|
|
|
endif()
|
|
|
|
|
2023-05-17 20:20:53 -07:00
|
|
|
add_subdirectory(zion)
|
2023-10-25 22:18:29 -07:00
|
|
|
add_subdirectory(yunq)
|
2024-01-16 18:58:03 -08:00
|
|
|
add_subdirectory(lib)
|
2023-11-26 21:14:45 -08:00
|
|
|
add_subdirectory(usr)
|
2023-05-29 00:32:54 -07:00
|
|
|
add_subdirectory(sys)
|