Advent of Code solutions implemented in the C programming language with the C23 standard in mind.
The solutions themselves are located in the challenges/ directory under the respective year.
They have a suffix of either a or b relative to the part of the challenge being solved.
cmake>= 3.21gcc>= 15 or equivalent for C23sh
The uthash header only library is included as well.
It's fetched and made available during configure time through CMake's FetchContent module.
Build all of the challenges:
$ cmake -S . -DENABLE_TEST=ON -B build && cmake --build buildThe ENABLE_TEST CMake variable enables the ctest test cases for each of the challenges.
To run a specific challenge:
(build) $ ctest -V -L <YYYY> -R <DAY><PART>Make sure to replace <YYYY> and <DAY><PART>, respectively, with the desired year and challenge day along with the part suffix (a or b), e.g. 1a.
To change the test cases' inputs, modify them in the inputs/<YYYY>/ directory.
See LICENSE.