Skip to content

FrederikTobner/AdventOfCode2024

Repository files navigation

Advent of Code 2024

Build Test Benchmarks

Solutions for the Advent of Code 2024 written in C++.

Merry Christmas

Uses CMake as the build system and the C++ 23 standard. Requires at least CMake 3.24 and a C++23 compliant compiler (GCC 13.1 or MSVC 17.12.1). Some of the features used in the code are not implemented in the versions of GCC available under ubuntu and macOS, so some compatibility layers have been created to make the code compile with GCC 13.1.

Tests

The tests are written using the GoogleTest framework To build and run the tests, you need to enable the BUILD_TESTS option in CMake, when configuring the project.

Performance Tests

The performance tests are written using the GoogleBenchmark framework. To build and run the performance tests, you need to enable the BUILD_BENCHMARKS option in CMake, when configuring the project.

Layout

Every day has three subdirectories and build targets:

  • src: Contains the source code for the solution. Only the main function is in this directory.
  • lib: Contains the source code for the library that is used by the solution.
  • test: Contains the source code for the testing the solution in the lib directory.
  • benchmark: Contains the source code for benchmarking the solution in the lib directory.