AOC2023: Add program to run all days
This commit is contained in:
@@ -19,6 +19,7 @@ set(AOC2023_PROJECTS
|
||||
day14
|
||||
day15
|
||||
day16
|
||||
full
|
||||
)
|
||||
|
||||
set(BANAN_AOC2023_BIN ${BANAN_BIN}/aoc2023)
|
||||
|
||||
20
userspace/aoc2023/full/CMakeLists.txt
Normal file
20
userspace/aoc2023/full/CMakeLists.txt
Normal file
@@ -0,0 +1,20 @@
|
||||
cmake_minimum_required(VERSION 3.26)
|
||||
|
||||
project(aoc2023-full CXX)
|
||||
|
||||
set(SOURCES
|
||||
main.cpp
|
||||
)
|
||||
|
||||
add_executable(aoc2023-full ${SOURCES})
|
||||
target_compile_options(aoc2023-full PUBLIC -O2 -g)
|
||||
target_link_libraries(aoc2023-full PUBLIC libc)
|
||||
|
||||
add_custom_target(aoc2023-full-install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/aoc2023-full ${BANAN_AOC2023_BIN}/full
|
||||
DEPENDS aoc2023-full
|
||||
DEPENDS aoc2023_always
|
||||
)
|
||||
|
||||
add_dependencies(aoc2023 aoc2023-full)
|
||||
add_dependencies(aoc2023-install aoc2023-full-install)
|
||||
18
userspace/aoc2023/full/main.cpp
Normal file
18
userspace/aoc2023/full/main.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
for (int i = 1; i <= 16; i++)
|
||||
{
|
||||
printf("day %d:\n", i);
|
||||
|
||||
char command[128];
|
||||
sprintf(command, "/bin/aoc2023/day%d", i);
|
||||
|
||||
system(command);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user