This repository was archived by the owner on Jun 26, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
56 lines (44 loc) · 1.73 KB
/
CMakeLists.txt
File metadata and controls
56 lines (44 loc) · 1.73 KB
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
cmake_minimum_required(VERSION 2.8.2)
if(${CMAKE_VERSION} VERSION_LESS 2.8.2)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
endif()
project(graphs
DESCRIPTION "SPT and MST algos"
LANGUAGES CXX)
set(CMAKE_BUILD_TYPE Debug)
set(HEADERS
${CMAKE_SOURCE_DIR}/include/adjacency_list.hpp
${CMAKE_SOURCE_DIR}/include/adjacency_matrix.hpp
${CMAKE_SOURCE_DIR}/include/node.hpp
${CMAKE_SOURCE_DIR}/include/file_handler.hpp
${CMAKE_SOURCE_DIR}/include/edge.hpp)
set(SOURCES
${CMAKE_SOURCE_DIR}/src/main.cpp
${CMAKE_SOURCE_DIR}/src/adjacency_matrix.cpp
${CMAKE_SOURCE_DIR}/src/adjacency_list.cpp
${CMAKE_SOURCE_DIR}/src/node.cpp
${CMAKE_SOURCE_DIR}/src/file_handler.cpp
${CMAKE_SOURCE_DIR}/src/edge.cpp)
add_executable(graphs ${SOURCES} ${HEADERS})
# Pull and install gtest.
include(${CMAKE_SOURCE_DIR}/cmake/gtest_install.cmake)
set(PROJECT_TEST_NAME graphs_test)
add_executable(${PROJECT_TEST_NAME})
target_sources(${PROJECT_TEST_NAME}
PRIVATE
"${CMAKE_SOURCE_DIR}/test/adjacency_matrix_test.cpp"
"${CMAKE_SOURCE_DIR}/test/adjacency_list_test.cpp"
"${CMAKE_SOURCE_DIR}/test/spt_matrix_test.cpp"
"${CMAKE_SOURCE_DIR}/test/spt_list_test.cpp"
"${CMAKE_SOURCE_DIR}/test/mst_matrix_test.cpp"
"${CMAKE_SOURCE_DIR}/test/mst_list_test.cpp"
"${CMAKE_SOURCE_DIR}/test/file_handler_test.cpp"
"${CMAKE_SOURCE_DIR}/src/adjacency_matrix.cpp"
"${CMAKE_SOURCE_DIR}/src/adjacency_list.cpp"
"${CMAKE_SOURCE_DIR}/src/file_handler.cpp"
"${CMAKE_SOURCE_DIR}/src/edge.cpp"
"${CMAKE_SOURCE_DIR}/src/node.cpp")
target_include_directories(${PROJECT_TEST_NAME}
PRIVATE ${GTEST_INCLUDE_DIRS}
PRIVATE "./include")
target_link_libraries(${PROJECT_TEST_NAME} gtest_main)