-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
43 lines (38 loc) · 1.14 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
cmake_minimum_required(VERSION 3.20)
project(advent2024 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD_REQUIRED 20)
add_compile_options(-Wall -Wextra -Wpedantic -O2)
function(add_challenge name)
add_executable(${name} ${CMAKE_CURRENT_SOURCE_DIR}/src/${name}.cpp)
target_include_directories(${name} PRIVATE ${CMAKE_SOURCE_DIR}/include)
set_property(TARGET ${name} PROPERTY CXX_STANDARD 20)
endfunction(add_challenge)
add_challenge(day1)
add_challenge(day1_part2)
add_challenge(day2_part1)
add_challenge(day3)
add_challenge(day4)
add_challenge(day5)
add_challenge(day7)
add_challenge(day8)
add_challenge(day9)
add_challenge(day10)
add_challenge(day11)
add_challenge(day12)
add_challenge(day13)
add_challenge(day14)
add_challenge(day15)
add_challenge(day16)
add_challenge(day17)
add_challenge(day18)
add_challenge(day19)
add_challenge(day24)
add_challenge(day25)
add_custom_command(TARGET day1
COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/data" "./data"
)
find_package(CURL)
if(CURL_FOUND)
add_executable(input_downloader src/utils/input_downloader.cpp)
target_link_libraries(input_downloader PRIVATE ${CURL_LIBRARIES})
endif()