aoc2024: prepare programming environment

This commit is contained in:
2024-12-01 02:47:01 +02:00
parent 9c2fcd745c
commit 11cac7a646
8 changed files with 126 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
set(SOURCES
main.cpp
)
add_executable(aoc2024_full ${SOURCES})
banan_include_headers(aoc2024_full ban)
banan_link_library(aoc2024_full libc)
install(TARGETS aoc2024_full OPTIONAL)

View File

@@ -0,0 +1,22 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
int main()
{
for (int i = 1; i <= 25; i++)
{
char command[128];
sprintf(command, "/bin/aoc2024/day%d", i);
struct stat st;
if (stat(command, &st) == -1)
continue;
printf("day%d\n", i);
system(command);
}
return 0;
}