-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
93 lines (64 loc) · 3.66 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
# SPDX-FileCopyrightText: © Sebastián Mancilla <smancill@smancill.dev>
#
# SPDX-License-Identifier: MIT-0
cmake_minimum_required(VERSION 3.16.3)
project(HackerRank LANGUAGES CXX)
if(POLICY CMP0135)
cmake_policy(SET CMP0135 NEW)
endif()
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "No build type selected, default to Release")
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
Debug Release MinSizeRel RelWithDebInfo)
endif()
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
include(CheckTypeSize)
check_type_size(long SIZEOF_LONG BUILTIN_TYPES_ONLY LANGUAGE CXX)
if(SIZEOF_LONG LESS 8)
message(FATAL_ERROR "LP64 data model is required")
endif()
add_compile_options(-Wall -Wextra)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Algorithms
add_executable(diagonal-difference algorithms/warm-up/diagonal-difference.cpp)
add_executable(plus-minus algorithms/warm-up/plus-minus.cpp)
add_executable(mini-max-sum algorithms/warm-up/mini-max-sum.cpp)
add_executable(time-conversion algorithms/warm-up/time-conversion.cpp)
add_executable(subarray-division algorithms/implementation/subarray-division.cpp)
add_executable(sales-by-match algorithms/implementation/sales-by-match.cpp)
add_executable(drawing-book algorithms/implementation/drawing-book.cpp)
add_executable(caesar-cipher algorithms/strings/caesar-cipher.cpp)
add_executable(pangrams algorithms/strings/pangrams.cpp)
add_executable(palindrome-index algorithms/strings/palindrome-index.cpp)
add_executable(counting-sort-1 algorithms/sorting/counting-sort-1.cpp)
add_executable(find-median algorithms/sorting/find-median.cpp)
add_executable(pairs algorithms/search/pairs.cpp)
add_executable(sherlock-and-array algorithms/search/sherlock-and-array.cpp)
add_executable(bfs-shortest-reach algorithms/graph-theory/bfs-shortest-reach.cpp)
add_executable(grid-challenge algorithms/greedy/grid-challenge.cpp)
add_executable(max-min algorithms/greedy/max-min.cpp)
add_executable(permuting-two-arrays algorithms/greedy/permuting-two-arrays.cpp)
add_executable(lego-blocks algorithms/dynamic-programming/lego-blocks.cpp)
add_executable(flipping-matrix algorithms/constructive/flipping-matrix.cpp)
add_executable(new-year-chaos algorithms/constructive/new-year-chaos.cpp)
add_executable(lonely-integer algorithms/bit-manipulation/lonely-integer.cpp)
add_executable(counter-game algorithms/bit-manipulation/counter-game.cpp)
add_executable(sum-vs-xor algorithms/bit-manipulation/sum-vs-xor.cpp)
add_executable(flipping-bits algorithms/bit-manipulation/flipping-bits.cpp)
add_executable(recursive-digit-sum algorithms/recursion/recursive-digit-sum.cpp)
add_executable(tower-breakers algorithms/game-theory/tower-breakers.cpp)
# Data structures
add_executable(dynamic-array data-structures/arrays/dynamic-array.cpp)
add_executable(sparse-arrays data-structures/arrays/sparse-arrays.cpp)
add_executable(merge-two-linked-lists data-structures/linked-lists/merge-two-linked-lists.cpp)
add_executable(tree-preorder-traversal data-structures/trees/tree-preorder-traversal.cpp)
add_executable(tree-huffman-decoding data-structures/trees/tree-huffman-decoding.cpp)
add_executable(balanced-brackets data-structures/stacks/balanced-brackets.cpp)
add_executable(simple-text-editor data-structures/stacks/simple-text-editor.cpp)
add_executable(queue-using-two-stacks data-structures/queues/queue-using-two-stacks.cpp)
add_executable(truck-tour data-structures/queues/truck-tour.cpp)
add_executable(jesse-and-cookies data-structures/heap/jesse-and-cookies.cpp)
add_executable(no-prefix-set data-structures/trie/no-prefix-set.cpp)