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)
|
|
|
|
|
|
|
|
add_subdirectory(zion)
|
2023-05-29 00:32:54 -07:00
|
|
|
add_subdirectory(sys)
|
2023-05-17 20:20:53 -07:00
|
|
|
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT disk.img
|
|
|
|
COMMAND sudo sh ../scripts/build_image.sh disk.img
|
2023-05-30 20:54:37 -07:00
|
|
|
DEPENDS zion test test2
|
2023-05-17 20:20:53 -07:00
|
|
|
USES_TERMINAL
|
|
|
|
)
|
|
|
|
|
|
|
|
add_custom_target(qemu
|
2023-05-17 22:46:19 -07:00
|
|
|
COMMAND qemu-system-x86_64 -d guest_errors -m 1G -serial stdio -hda disk.img
|
|
|
|
DEPENDS disk.img
|
|
|
|
USES_TERMINAL)
|
|
|
|
|
|
|
|
add_custom_target(qemu-dbg
|
|
|
|
COMMAND qemu-system-x86_64 -d guest_errors -m 1G -serial stdio -hda disk.img -S -s
|
2023-05-17 20:20:53 -07:00
|
|
|
DEPENDS disk.img
|
|
|
|
USES_TERMINAL)
|