-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
50 lines (32 loc) · 1.41 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
cmake_minimum_required (VERSION 2.6)
project (Exercises)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -g")
SET(CMAKE_CXX_COMPILER "clang++")
#Basic Data Strucutres
include_directories ("${PROJECT_SOURCE_DIR}/src/data_structures")
add_subdirectory (src/data_structures)
include_directories("${PROJECT_SOURCE_DIR}/src/algorithms")
add_subdirectory (src/algorithms)
include_directories("${PROJECT_SOURCE_DIR}/test")
add_subdirectory (test)
add_executable (DataStructureExercises src/data_structures/main.cxx)
target_link_libraries (DataStructureExercises DataStructures TestLib stdc++)
add_executable (AlgorithmExercises src/algorithms/main.cxx)
target_link_libraries(AlgorithmExercises Algorithms TestLib stdc++)
set (EXTRA_LIBS ${EXTRA_LIBS} TestLib stdc++)
add_executable (InsertionSort test/InsertionSort.cpp)
target_link_libraries (InsertionSort ${EXTRA_LIBS})
add_executable (MergeSort test/MergeSort.cpp)
target_link_libraries (MergeSort ${EXTRA_LIBS})
add_executable (HeapSort test/HeapSort.cpp)
target_link_libraries (HeapSort ${EXTRA_LIBS} DataStructures)
add_executable (BSTSort test/BSTSort.cpp)
target_link_libraries (BSTSort ${EXTRA_LIBS})
add_executable (AVLSort test/AVLSort.cpp)
target_link_libraries (AVLSort ${EXTRA_LIBS})
enable_testing ()
add_test("InsertionSort" InsertionSort)
add_test("MergeSort" MergeSort)
add_test("HeapSort" HeapSort)
add_test("BSTSort" BSTSort)
add_test("AVLSort" AVLSort)