-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
52 lines (42 loc) · 1.16 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
cmake_minimum_required(VERSION 3.0)
project(graph VERSION 1.0.0 LANGUAGES CXX)
SET(CMAKE_CXX_FLAGS "-O3 -std=c++11")
########################
#######DIRECTORY########
########################
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
#define variable for binary directory
add_definitions(-DCMAKE_RUNTIME_OUTPUT_DIRECTORY="${CMAKE_BINARY_DIR}/bin/")
########################
######Dependencies######
########################
INCLUDE_DIRECTORIES(
include
src
${PROJECT_SOURCE_DIR}
)
#######################
########Library########
#######################
add_library(graph
include/Graph.cpp
include/Edge.cpp)
#####################
########Tests########
#####################
add_executable(testBellmanFord tests/testBellmanFord.cpp)
target_link_libraries(testBellmanFord
graph
)
add_executable(testDijkstras tests/testDijkstras.cpp)
target_link_libraries(testDijkstras
graph
)
add_executable(testFloydWarshall tests/testFloydWarshall.cpp)
target_link_libraries(testFloydWarshall
graph
)
# add_subdirectory(tests)
# enable_testing()