forked from vidalt/PDTSP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
72 lines (63 loc) · 1.95 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
cmake_minimum_required(VERSION 3.15)
project(pdtsp)
set(EXECUTABLE_OUTPUT_PATH "./")
if(NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -O3 -m64 -march=native -fPIC")
endif()
add_definitions(
-D_REENTRANT
-DBALAS_SIMONETTI
-DBUILD_PDP_VERSION=''
-DBUILD_PDP_VERSION_MSG=''
)
set(SOURCE_FILES_HGS
PDP-HGS/main.cpp
PDP-HGS/utils/application.cpp
PDP-HGS/utils/random.cpp
PDP-HGS/hgsadc/adcpopulation.cpp
PDP-HGS/hgsadc/hgsadc.cpp
PDP-HGS/pdp/instancereader.cpp
PDP-HGS/pdp/pdpeducate.cpp
PDP-HGS/pdp/pdpinstance.cpp
PDP-HGS/pdp/pdproute.cpp
PDP-HGS/pdp/pdprouteinfo.cpp
PDP-HGS/pdp/pdpsolution.cpp
PDP-HGS/pdp/moves/balas_simonetti/bscache.cpp
PDP-HGS/pdp/moves/balas_simonetti/bsgraph.cpp
PDP-HGS/pdp/moves/balas_simonetti/util.cpp
PDP-HGS/pdp/moves/pdp2koptmove.cpp
PDP-HGS/pdp/moves/pdp2optmove.cpp
PDP-HGS/pdp/moves/pdp4optmove.cpp
PDP-HGS/pdp/moves/pdpbsmove.cpp
PDP-HGS/pdp/moves/pdpmoveevaluation.cpp
PDP-HGS/pdp/moves/pdporoptmove.cpp
PDP-HGS/pdp/moves/pdprelocatemove.cpp
)
set(SOURCE_FILES_RR
PDP-RR/application.cpp
PDP-RR/instance.cpp
PDP-RR/operators.cpp
PDP-RR/random.cpp
PDP-RR/solver.cpp
)
include_directories(pdphgs PDP-HGS)
include_directories(pdprr PDP-RR)
add_executable(pdphgs ${SOURCE_FILES_HGS})
add_executable(pdprr ${SOURCE_FILES_RR})
if(DEFINED ENV{BOOST_ROOT})
set(Boost_ROOT $ENV{BOOST_ROOT})
elseif(DEFINED ENV{BOOSTROOT})
set(Boost_ROOT $ENV{BOOSTROOT})
else()
return()
endif()
file(GLOB BOOST_SEARCH_PATHS ${Boost_ROOT}/stage/lib/cmake/Boost-*)
find_path(Boost_DIR NAMES BoostConfig.cmake PATHS ${BOOST_SEARCH_PATHS})
find_package(Boost COMPONENTS program_options filesystem system regex)
if (Boost_FOUND)
include_directories(${BOOST_INCLUDE_DIRS})
target_link_libraries(pdphgs ${Boost_LIBRARIES})
target_link_libraries(pdprr ${Boost_LIBRARIES})
endif ()
target_link_libraries(pdphgs)
target_link_libraries(pdprr)