Refactor CMake and VSCode settings; add Day 4 solution

- Updated .vscode/settings.json to enhance Clangd configuration and disable IntelliSense.
- Removed obsolete Clang-Format and Clang-Tidy tasks from .vscode/tasks.json.
- Modified CMakeLists.txt to enable compile commands export and adjusted target properties for Day 4.
- Added new CMakeLists.txt and main.cpp for Day 4 solution, implementing diagram parsing and movable paper counting logic.
- Included test_input and puzzle_input files for Day 4.
- Deleted the run-clang-tidy.sh script as it is no longer needed.
This commit is contained in:
Feiko Wielsma 2025-12-04 14:22:43 +00:00
parent e3098c6651
commit eac8571ea7
11 changed files with 605 additions and 54 deletions

View file

@ -5,7 +5,7 @@ set(CMAKE_C_COMPILER /usr/bin/clang-21)
set(CMAKE_CXX_COMPILER /usr/bin/clang++-21)
project(aoc25 VERSION 0.1.0 LANGUAGES C CXX)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Helper to add AoC day targets and auto-copy any input files
function(aoc_add_day name src_dir)
# remaining args are source files
@ -13,8 +13,9 @@ function(aoc_add_day name src_dir)
add_executable(${name} ${sources})
set_target_properties(${name} PROPERTIES CXX_STANDARD 23 CXX_STANDARD_REQUIRED ON)
# Use GCC toolchain compatibility for clang++-21
target_compile_options(${name} PRIVATE --gcc-toolchain=/usr)
target_compile_options(${name} PRIVATE -stdlib=libc++)
target_link_options(${name} PRIVATE -stdlib=libc++)
# Gather common input files in the source directory
file(GLOB INPUT_FILES
@ -36,4 +37,5 @@ endfunction()
add_subdirectory(day1)
add_subdirectory(day2)
add_subdirectory(day3)
add_subdirectory(day4)