-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
40 lines (34 loc) · 2.94 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
cmake_minimum_required(VERSION 3.16.3)
project(Data_Structure)
set(CMAKE_CXX_STANDARD 20)
# place binaries and libraries according to GNU standards
include(GNUInstallDirs)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})
# we cannot analyse results without gcov
find_program(GCOV_PATH gcov)
if(NOT GCOV_PATH)
message(FATAL_ERROR "Code coverage analysis requires gcov!")
endif()
enable_testing()
add_subdirectory(test)
add_executable(List example/list_example.cpp List/List.h List/SinglyLinkedList.h List/SinglyLinkedList.cpp List/DoublyLinkedList.h List/DoublyLinkedList.cpp)
add_executable(Heap example/heap_example.cpp trees/Heap/Heap.h trees/Heap/Heap.cpp)
add_executable(Queue example/queue_example.cpp Queue/Queue.h Queue/Queue.cpp List/List.h List/SinglyLinkedList.h List/SinglyLinkedList.cpp)
add_executable(Stack example/stack_example.cpp Stack/Stack.h Stack/Stack.cpp List/List.h List/SinglyLinkedList.h List/SinglyLinkedList.cpp)
add_executable(LinearSearch example/list_example.cpp Algorithm/Searching/LinearSearch.cpp)
add_executable(BinarySearch example/binary_search_example.cpp Algorithm/Searching/BinarySearch.cpp)
add_executable(BubbleSort example/bubble_sort_example.cpp Algorithm/Sorting/BubbleSort.cpp)
add_executable(InsertionSort example/insertion_sort_example.cpp Algorithm/Sorting/insertionSort.cpp)
add_executable(MergeSort example/merge_sort_example.cpp Algorithm/Sorting/merge_sort.cpp)
add_executable(BST trees/BST/BST.h trees/BST/BST.cpp example/bst_example.cpp)
add_executable(AVL trees/BST/BST.h trees/BST/BST.cpp trees/AVL/AVL.h trees/AVL/AVL.cpp example/avl_example.cpp)
add_executable(HashTable vendor/VariadicTable.h HashTable/HashUtility.h HashTable/HashTable.h HashTable/HashTable.cpp example/hash_table_example.cpp)
add_executable(Dict vendor/VariadicTable.h HashTable/HashTable.h HashTable/HashTable.cpp Applications/Dict/Dict.cpp Applications/Dict/Dict.h example/dict_example.cpp)
add_executable(PyList Env.h Applications/List/List.h Applications/List/List.cpp example/_list_example.cpp)
add_executable(RBT trees/RBT/RBT.h trees/RBT/RBT.cpp example/rbt_example.cpp)
add_executable(AdjacencyListGraph Graph/Graphs/AdjacencyListGraph/AdjacencyListGraph.h Graph/Graphs/AdjacencyListGraph/AdjacencyListVertex.h example/adjacency_list_graph_example.cpp)
add_executable(AdjacencyMatrixGraph Graph/Graphs/AdjacencyMatrixGraph/AdjacencyMatrixGraph.h example/adjacency_matrix_graph_example.cpp)
add_executable(DFS Graph/Graphs/AdjacencyMatrixGraph/AdjacencyMatrixGraph.h Graph/Algorithms/DFS/DFSGraph.h Graph/Algorithms/DFS/DFSVertex.h Graph/Algorithms/DFS/DFS.h example/dfs_example.cpp)
add_executable(BFS Graph/Graphs/AdjacencyMatrixGraph/AdjacencyMatrixGraph.h Graph/Algorithms/DFS/DFSGraph.h Graph/Algorithms/DFS/DFSVertex.h Graph/Algorithms/BFS/BFS.h example/bfs_example.cpp)