-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
79 lines (60 loc) · 2.32 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
cmake_minimum_required(VERSION 3.11)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
add_definitions(-Wall -Wextra)
# L'exécutable principal
project(ReachabilityGame)
set(TARGET_NAME "ReachabilityGame")
set(LIBRARY_NAME ${TARGET_NAME}-lib)
set(SOURCES
src/Vertex.cpp
src/Graph.cpp
src/Player.cpp
src/Path.cpp
src/Game.cpp
src/ReachabilityGame.cpp
src/MinMaxGame.cpp
src/types/Long.cpp
src/exploration/BestFirstSearch.cpp
src/exploration/RandomPaths.cpp
src/algorithms/Tarjan.cpp
src/generators/GenerateWeights.cpp
src/generators/RandomGenerator.cpp
src/generators/RandomTreeLikeGenerator.cpp
src/generators/RandomStronglyConnectedGenerator.cpp
)
add_library(${LIBRARY_NAME} ${SOURCES})
target_include_directories(${LIBRARY_NAME} PUBLIC include)
add_executable(${TARGET_NAME} src/main.cpp)
target_link_libraries(${TARGET_NAME} ${LIBRARY_NAME})
# Générateur aléatoire naïf
add_executable(random_generator generators/randomGenerator.cpp)
target_link_libraries(random_generator ${LIBRARY_NAME})
target_include_directories(random_generator PUBLIC include)
# Générateur arbre
add_executable(tree_like_generator generators/treeLikeGenerator.cpp)
target_link_libraries(tree_like_generator ${LIBRARY_NAME})
target_include_directories(tree_like_generator PUBLIC include)
# Générateur fortement connexe
add_executable(strongly_connected_generator generators/stronglyConnectedGraph.cpp)
target_link_libraries(strongly_connected_generator ${LIBRARY_NAME})
target_include_directories(strongly_connected_generator PUBLIC include)
# Pour essayer de trouver un EN tel que pas tout le monde voit une cible sur un graphe fortement connexe
add_executable(find_EN generators/findEN.cpp)
target_link_libraries(find_EN ${LIBRARY_NAME})
target_include_directories(find_EN PUBLIC include)
# Documentation
set(BUILD_DOC FALSE CACHE BOOL "S'il faut construire la documentation ou pas")
if(BUILD_DOC)
add_subdirectory(docs)
endif(BUILD_DOC)
# Tests unitaires
set(BUILD_TESTS FALSE CACHE BOOL "S'il faut construire les tests ou pas")
if(BUILD_TESTS)
add_subdirectory(tests)
endif(BUILD_TESTS)
# Tests de performance
set(BUILD_PERFORMANCE FALSE CACHE BOOL "S'il faut construire les tests de performance ou pas")
if(BUILD_PERFORMANCE)
add_subdirectory(performance)
endif(BUILD_PERFORMANCE)