-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
128 lines (98 loc) · 4.47 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
cmake_minimum_required(VERSION 3.11)
project(AOC2023)
# set(CMAKE_CXX_FLAGS "-Wall -Werror -Wshadow -std=c++20 -fno-omit-frame-pointer -ggdb3 -O0")
# set(CMAKE_CXX_FLAGS "-Wall -Werror -Wshadow -std=c++20 -fno-omit-frame-pointer -ggdb3 -O0 -fsanitize=address")
# set(CMAKE_CXX_FLAGS "-Wall -Werror -Wshadow -std=c++20 -fno-omit-frame-pointer -ggdb3 -O3")
set(CMAKE_CXX_FLAGS "-Wall -Werror -Wshadow -std=c++20 -fno-omit-frame-pointer -ggdb3 -O3 -fsanitize=address")
# set(CMAKE_CXX_FLAGS "-Wall -Werror -Wshadow -std=c++20 -fno-omit-frame-pointer -ggdb3 -O3 -fsanitize=memory -fsanitize-memory-track-origins")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
find_package(Boost COMPONENTS regex REQUIRED)
find_package(range-v3 REQUIRED)
# find_package(RapidJSON REQUIRED)
find_package(fmt REQUIRED)
find_package(TBB REQUIRED)
# find_package(PkgConfig)
# pkg_check_modules(CRYPTOPP libcryptopp)
# if (NOT CRYPTOPP_FOUND)
# pkg_check_modules(CRYPTOPP libcrypto++)
# endif()
# if (NOT CRYPTOPP_FOUND)
# message(FATAL_ERROR "Crypto++ library not found")
# endif()
set (DEFAULT_LIBS fmt)
add_executable(day1 src/day1.cc)
target_compile_features(day1 PRIVATE cxx_std_20)
target_link_libraries(day1 PRIVATE ${DEFAULT_LIBS} boost_regex)
add_executable(day2 src/day2.cc)
target_compile_features(day2 PRIVATE cxx_std_20)
target_link_libraries(day2 PRIVATE ${DEFAULT_LIBS})
add_executable(day3 src/day3.cc)
target_compile_features(day3 PRIVATE cxx_std_20)
target_link_libraries(day3 PRIVATE ${DEFAULT_LIBS})
add_executable(day4 src/day4.cc)
target_compile_features(day4 PRIVATE cxx_std_20)
target_link_libraries(day4 PRIVATE ${DEFAULT_LIBS})
add_executable(day5 src/day5.cc)
target_compile_features(day5 PRIVATE cxx_std_20)
target_link_libraries(day5 PRIVATE ${DEFAULT_LIBS} tbb)
add_executable(day6 src/day6.cc)
target_compile_features(day6 PRIVATE cxx_std_20)
target_link_libraries(day6 PRIVATE ${DEFAULT_LIBS})
add_executable(day7 src/day7.cc)
target_compile_features(day7 PRIVATE cxx_std_20)
target_link_libraries(day7 PRIVATE ${DEFAULT_LIBS})
add_executable(day8 src/day8.cc)
target_compile_features(day8 PRIVATE cxx_std_20)
target_link_libraries(day8 PRIVATE ${DEFAULT_LIBS})
add_executable(day9 src/day9.cc)
target_compile_features(day9 PRIVATE cxx_std_20)
target_link_libraries(day9 PRIVATE ${DEFAULT_LIBS})
add_executable(day10 src/day10.cc)
target_compile_features(day10 PRIVATE cxx_std_20)
target_link_libraries(day10 PRIVATE ${DEFAULT_LIBS})
add_executable(day11 src/day11.cc)
target_compile_features(day11 PRIVATE cxx_std_20)
target_link_libraries(day11 PRIVATE ${DEFAULT_LIBS})
add_executable(day12 src/day12.cc)
target_compile_features(day12 PRIVATE cxx_std_20)
target_link_libraries(day12 PRIVATE ${DEFAULT_LIBS})
add_executable(day13 src/day13.cc)
target_compile_features(day13 PRIVATE cxx_std_20)
target_link_libraries(day13 PRIVATE ${DEFAULT_LIBS})
add_executable(day14 src/day14.cc)
target_compile_features(day14 PRIVATE cxx_std_20)
target_link_libraries(day14 PRIVATE ${DEFAULT_LIBS})
add_executable(day15 src/day15.cc)
target_compile_features(day15 PRIVATE cxx_std_20)
target_link_libraries(day15 PRIVATE ${DEFAULT_LIBS})
add_executable(day16 src/day16.cc)
target_compile_features(day16 PRIVATE cxx_std_20)
target_link_libraries(day16 PRIVATE ${DEFAULT_LIBS} tbb)
add_executable(day17 src/day17.cc)
target_compile_features(day17 PRIVATE cxx_std_20)
target_link_libraries(day17 PRIVATE ${DEFAULT_LIBS})
add_executable(day18 src/day18.cc)
target_compile_features(day18 PRIVATE cxx_std_20)
target_link_libraries(day18 PRIVATE ${DEFAULT_LIBS})
add_executable(day19 src/day19.cc)
target_compile_features(day19 PRIVATE cxx_std_20)
target_link_libraries(day19 PRIVATE ${DEFAULT_LIBS})
add_executable(day20 src/day20.cc)
target_compile_features(day20 PRIVATE cxx_std_20)
target_link_libraries(day20 PRIVATE ${DEFAULT_LIBS} tbb)
add_executable(day21 src/day21.cc)
target_compile_features(day21 PRIVATE cxx_std_20)
target_link_libraries(day21 PRIVATE ${DEFAULT_LIBS})
add_executable(day22 src/day22.cc)
target_compile_features(day22 PRIVATE cxx_std_20)
target_link_libraries(day22 PRIVATE ${DEFAULT_LIBS})
add_executable(day23 src/day23.cc)
target_compile_features(day23 PRIVATE cxx_std_20)
target_link_libraries(day23 PRIVATE ${DEFAULT_LIBS})
add_executable(day24 src/day24.cc)
target_compile_features(day24 PRIVATE cxx_std_20)
target_link_libraries(day24 PRIVATE ${DEFAULT_LIBS})
add_executable(day25 src/day25.cc)
target_compile_features(day25 PRIVATE cxx_std_20)
target_link_libraries(day25 PRIVATE ${DEFAULT_LIBS})
enable_testing()