-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
165 lines (153 loc) · 7.45 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
cmake_minimum_required(VERSION 3.7.2)
project(tsppd)
option(GIST "GIST" ON)
if(${GIST})
add_definitions(-DGIST)
endif(${GIST})
# Speed up builds with pre-compiled headers
set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake")
include(cotire)
# Compiler flags
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -std=c++14 -Werror -Wall -Wextra -Wno-unused-parameter -Wno-delete-non-virtual-dtor -pedantic-errors")
# Where to look for header filess
include_directories(src/)
include_directories("$ENV{GECODE_HOME}")
link_directories("$ENV{GECODE_HOME}")
include_directories("$ENV{GUROBI_HOME}/include")
link_directories("$ENV{GUROBI_HOME}/src/build")
link_directories("$ENV{GUROBI_HOME}/lib")
# Libraries we link against
set(BOOST_LIBRARIES boost_program_options)
if(${GIST})
set(GECODE_LIBRARIES gecodefloat gecodegist gecodeint gecodekernel gecodeminimodel gecodesearch gecodeset gecodesupport)
else(${GIST})
set(GECODE_LIBRARIES gecodefloat gecodeint gecodekernel gecodeminimodel gecodesearch gecodeset gecodesupport)
endif(${GIST})
set(GUROBI_LIBRARIES gurobi_c++ gurobi81 m)
set(ALL_LIBRARIES ${BOOST_LIBRARIES} ${GECODE_LIBRARIES} ${GUROBI_LIBRARIES})
# This allows "make install" to put all the headers in the right place.
set(TSPPD_LIB_HEADERS
src/tsppd/ap/ap_solver.h
src/tsppd/ap/gurobi_ap_solver.h
src/tsppd/ap/primal_dual_ap_solver.h
src/tsppd/data/tsppd_arc.h
src/tsppd/data/tsppd_problem.h
src/tsppd/data/tsppd_problem_generator.h
src/tsppd/data/tsppd_search_statistics.h
src/tsppd/data/tsppd_solution.h
src/tsppd/data/tsppd_tree.h
src/tsppd/io/tsp_problem_reader.h
src/tsppd/io/tsp_problem_writer.h
src/tsppd/io/tsp_solution_writer.h
src/tsppd/solver/ap/ap_atsp_callback.h
src/tsppd/solver/ap/ap_atsp_solver.h
src/tsppd/solver/ap/ap_atsppds_callback.h
src/tsppd/solver/ap/ap_atsppd_solver.h
src/tsppd/solver/enumerative/enumerative_tsp_solver.h
src/tsppd/solver/enumerative/enumerative_tsppd_solver.h
src/tsppd/solver/focacci/brancher/focacci_tsp_branch_choice.h
src/tsppd/solver/focacci/brancher/focacci_tsp_brancher.cpp
src/tsppd/solver/focacci/brancher/focacci_tsp_closest_neighbor_brancher.h
src/tsppd/solver/focacci/brancher/focacci_tsp_regret_brancher.h
src/tsppd/solver/focacci/brancher/focacci_tsp_sequential_closest_neighbor_brancher.h
src/tsppd/solver/focacci/dual/focacci_closest_neighbor_dual.h
src/tsppd/solver/focacci/dual/focacci_tsp_dual.h
src/tsppd/solver/focacci/filter/one_tree/focacci_tsp_one_tree.h
src/tsppd/solver/focacci/filter/focacci_tsp_aphk_filter.h
src/tsppd/solver/focacci/filter/focacci_tsp_assignment_filter.h
src/tsppd/solver/focacci/filter/focacci_tsp_filter.h
src/tsppd/solver/focacci/filter/focacci_tsp_heldkarp_filter.h
src/tsppd/solver/focacci/filter/focacci_tsp_hkap_filter.h
src/tsppd/solver/focacci/propagator/focacci_tsppd_omc_propagator.h
src/tsppd/solver/focacci/propagator/focacci_tsppd_precede_cost_propagator.h
src/tsppd/solver/focacci/propagator/focacci_tsppd_precede_propagator.h
src/tsppd/solver/focacci/propagator/focacci_tsppd_precede_set_propagator.h
src/tsppd/solver/focacci/focacci_tsp_solver.h
src/tsppd/solver/focacci/focacci_tsp_space.h
src/tsppd/solver/focacci/focacci_tsppd_solver.h
src/tsppd/solver/focacci/focacci_tsppd_space.h
src/tsppd/solver/oneil/oneil_atsppd_plus_solver.h
src/tsppd/solver/oneil/oneil_atsppd_solver.h
src/tsppd/solver/ruland/callback/ruland_precedence_callback.h
src/tsppd/solver/ruland/callback/ruland_subtour_elimination_callback.h
src/tsppd/solver/ruland/callback/ruland_tsp_callback.h
src/tsppd/solver/ruland/callback/ruland_tsp_callback_handler.h
src/tsppd/solver/ruland/ruland_subtour_finder.h
src/tsppd/solver/ruland/ruland_tsp_solver.h
src/tsppd/solver/ruland/ruland_tsppd_plus_solver.h
src/tsppd/solver/ruland/ruland_tsppd_solver.h
src/tsppd/solver/sarin/sarin_atsp_callback.h
src/tsppd/solver/sarin/sarin_atsp_solver.h
src/tsppd/solver/sarin/sarin_atsppd_callback.h
src/tsppd/solver/sarin/sarin_atsppd_plus_solver.h
src/tsppd/solver/sarin/sarin_atsppd_solver.h
src/tsppd/solver/tsp_solver.h
src/tsppd/util/exception.h
src/tsppd/util/stacktrace.h
src/tsppd/util/string.h)
set(TSPPD_LIB_SOURCES
src/tsppd/ap/ap_solver.cpp
src/tsppd/ap/gurobi_ap_solver.cpp
src/tsppd/ap/primal_dual_ap_solver.cpp
src/tsppd/data/tsppd_problem.cpp
src/tsppd/data/tsppd_problem_generator.cpp
src/tsppd/data/tsppd_solution.cpp
src/tsppd/data/tsppd_tree.cpp
src/tsppd/io/tsp_problem_reader.cpp
src/tsppd/io/tsp_problem_writer.cpp
src/tsppd/io/tsp_solution_writer.cpp
src/tsppd/solver/ap/ap_atsp_callback.cpp
src/tsppd/solver/ap/ap_atsp_solver.cpp
src/tsppd/solver/ap/ap_atsppd_callback.cpp
src/tsppd/solver/ap/ap_atsppd_solver.cpp
src/tsppd/solver/enumerative/enumerative_tsp_solver.cpp
src/tsppd/solver/enumerative/enumerative_tsppd_solver.cpp
src/tsppd/solver/focacci/brancher/focacci_tsp_brancher.cpp
src/tsppd/solver/focacci/brancher/focacci_tsp_closest_neighbor_brancher.cpp
src/tsppd/solver/focacci/brancher/focacci_tsp_regret_brancher.cpp
src/tsppd/solver/focacci/brancher/focacci_tsp_sequential_closest_neighbor_brancher.cpp
src/tsppd/solver/focacci/dual/focacci_closest_neighbor_dual.cpp
src/tsppd/solver/focacci/filter/one_tree/focacci_tsp_one_tree.cpp
src/tsppd/solver/focacci/filter/focacci_tsp_aphk_filter.cpp
src/tsppd/solver/focacci/filter/focacci_tsp_assignment_filter.cpp
src/tsppd/solver/focacci/filter/focacci_tsp_heldkarp_filter.cpp
src/tsppd/solver/focacci/filter/focacci_tsp_hkap_filter.cpp
src/tsppd/solver/focacci/propagator/focacci_tsppd_omc_propagator.cpp
src/tsppd/solver/focacci/propagator/focacci_tsppd_precede_cost_propagator.cpp
src/tsppd/solver/focacci/propagator/focacci_tsppd_precede_set_propagator.cpp
src/tsppd/solver/focacci/focacci_tsp_solver.cpp
src/tsppd/solver/focacci/focacci_tsp_space.cpp
src/tsppd/solver/focacci/focacci_tsppd_solver.cpp
src/tsppd/solver/focacci/focacci_tsppd_space.cpp
src/tsppd/solver/oneil/oneil_atsppd_plus_solver.cpp
src/tsppd/solver/oneil/oneil_atsppd_solver.cpp
src/tsppd/solver/ruland/callback/ruland_precedence_callback.cpp
src/tsppd/solver/ruland/callback/ruland_subtour_elimination_callback.cpp
src/tsppd/solver/ruland/callback/ruland_tsp_callback_handler.cpp
src/tsppd/solver/ruland/ruland_subtour_finder.cpp
src/tsppd/solver/ruland/ruland_tsp_solver.cpp
src/tsppd/solver/ruland/ruland_tsppd_plus_solver.cpp
src/tsppd/solver/ruland/ruland_tsppd_solver.cpp
src/tsppd/solver/sarin/sarin_atsp_callback.cpp
src/tsppd/solver/sarin/sarin_atsp_solver.cpp
src/tsppd/solver/sarin/sarin_atsppd_callback.cpp
src/tsppd/solver/sarin/sarin_atsppd_plus_solver.cpp
src/tsppd/solver/sarin/sarin_atsppd_solver.cpp
src/tsppd/util/stacktrace.cpp)
# tsppd library
add_library(tsppd SHARED ${TSPPD_LIB_SOURCES})
target_link_libraries(tsppd ${ALL_LIBRARIES})
cotire(tsppd)
# ap test executable
set(TSPPD_BIN_SOURCES src/tsppd-bin/ap.cpp)
add_executable(ap-bin ${TSPPD_BIN_SOURCES})
target_link_libraries(ap-bin tsppd ${ALL_LIBRARIES})
set_target_properties(ap-bin PROPERTIES OUTPUT_NAME ap)
cotire(ap-bin)
# tsppd executable
set(TSPPD_BIN_SOURCES src/tsppd-bin/main.cpp)
add_executable(tsppd-bin ${TSPPD_BIN_SOURCES})
target_link_libraries(tsppd-bin tsppd ${ALL_LIBRARIES})
set_target_properties(tsppd-bin PROPERTIES OUTPUT_NAME tsppd)
cotire(tsppd-bin)