This holds my attempts at Advent of Code solutions. The solutions will mostly be in C++ and Python for practicing.
This project uses a few Python packages for C++ linting/etc. On first setup, follow the instructions to properly setup your build environment.
- Clone the repo:
git clone [email protected]:dylan-thomas832/aoc.git
- Change directory:
cd aoc
- Create a development Python environment:
python -m venv .venv
- Activate the environment:
source .venv/bin/activate
- Install Python packages via
pip
:pip install -r requirements.txt
- Install
pre-commit
hooks:pre-commit install
Once you completed the developer install, you only have to repeat Step 4 when starting to work.
This project uses cmake
to build, and is currently only tested to build on Linux using GCC.
cmake
is installed via pip
in the previous section, but you'll need to make sure a valid GCC is installed with version 8 or higher.
The project executables can be built simply by running make
which will configure, build, and install everything via cmake
.
By default, it builds in RelWithDebInfo
mode, but running make debug all
or make release all
can change the build type.
To clean the project, removing built object files & executables, run make clean
.
A complete rebuild, including forcing cmake
to reconfigure is done via make new
.
Once built and installed, each day/part has a separate executable that can be run independently. The input file will be co-located with the day's source code:
$ ./src/2022/day1/run_part1.exe src/2022/day1/input.txt
The elf at 224 has 68923 calories
- Improve CMake build types
- Figure out how to debug
- Create top-level
include
andsrc
directories with years under it -
Create script to compare outputs of each version - Create installation instructions
Days are deleted once completed & verified. This includes both versions.
- 2022
- Day 4
- Day 5
- Day 6
- Day 7
- Day 8
- Day 9
- Day 10
- Day 11
- Day 12
- Day 13
- Day 14
- Day 15
- Day 16
- Day 17
- Day 18
- Day 19
- Day 20
- Day 21
- Day 22
- Day 23
- Day 24
- Day 25