forked from Bananymous/banan-os
Userspace: Prepare aoc2023 environment :)
This commit is contained in:
parent
6ccb1bbbf9
commit
dabd79afa7
|
@ -39,6 +39,8 @@ endforeach()
|
|||
add_custom_target(userspace)
|
||||
add_custom_target(userspace-install DEPENDS userspace)
|
||||
|
||||
add_subdirectory(aoc2023)
|
||||
|
||||
foreach(USERSPACE_PROJECT ${USERSPACE_PROJECTS})
|
||||
target_compile_options(${USERSPACE_PROJECT} PRIVATE -g)
|
||||
add_dependencies(${USERSPACE_PROJECT} libc-install ban-install)
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
cmake_minimum_required(VERSION 3.26)
|
||||
|
||||
project(aoc2023 CXX)
|
||||
|
||||
set(AOC2023_PROJECTS
|
||||
day1
|
||||
)
|
||||
|
||||
foreach(AOC2023_PROJECT ${AOC2023_PROJECTS})
|
||||
add_subdirectory(${AOC2023_PROJECT})
|
||||
endforeach()
|
||||
|
||||
add_custom_target(aoc2023)
|
||||
add_custom_target(aoc2023-install DEPENDS aoc2023)
|
||||
|
||||
foreach(AOC2023_PROJECT ${AOC2023_PROJECTS})
|
||||
target_compile_options(${AOC2023_PROJECT} PRIVATE -g)
|
||||
add_dependencies(${AOC2023_PROJECT} libc-install ban-install )
|
||||
add_dependencies(aoc2023 ${AOC2023_PROJECT})
|
||||
add_dependencies(aoc2023-install ${AOC2023_PROJECT}-install)
|
||||
endforeach()
|
||||
|
||||
add_dependencies(userspace aoc2023)
|
||||
add_dependencies(userspace-install aoc2023-install)
|
|
@ -0,0 +1,17 @@
|
|||
cmake_minimum_required(VERSION 3.26)
|
||||
|
||||
project(day1 CXX)
|
||||
|
||||
set(SOURCES
|
||||
main.cpp
|
||||
)
|
||||
|
||||
add_executable(day1 ${SOURCES})
|
||||
target_compile_options(day1 PUBLIC -O2 -g)
|
||||
target_link_libraries(day1 PUBLIC libc)
|
||||
|
||||
add_custom_target(day1-install
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${BANAN_BIN}/aoc2023
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/day1 ${BANAN_BIN}/aoc2023/
|
||||
DEPENDS day1
|
||||
)
|
|
@ -0,0 +1,6 @@
|
|||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
printf("hello world\n");
|
||||
}
|
Loading…
Reference in New Issue