-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
33 lines (25 loc) · 985 Bytes
/
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
cmake_minimum_required(VERSION 3.0)
include(CPack)
project(vns)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
find_package(CPLEX REQUIRED)
if(CPLEX_FOUND)
include_directories(${CPLEX_INCLUDE_DIR})
link_directories(${CPLEX_LIBRARY})
endif()
if(CPLEX_CONCERT_FOUND)
include_directories(${CPLEX_CONCERT_INCLUDE_DIR})
link_directories(${CPLEX_CONCERT_LIBRARY})
endif()
if(CPLEX_ILOCPLEX_FOUND)
include_directories(${CPLEX_ILOCPLEX_INCLUDE_DIR})
link_directories(${CPLEX_ILOCPLEX_LIBRARY})
endif()
if(CPLEX_CP_FOUND)
include_directories(${CPLEX_CP_INCLUDE_DIR})
link_directories(${CPLEX_CP_LIBRARY})
endif()
set(CMAKE_CXX_FLAGS_DEBUG "-g -ggdb -Wall -Wunused -Wno-unknown-pragmas -fPIC -DIL_STD -fexceptions -std=c++0x ")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -march=native -lm -lpthread -ldl -mtune=native")
add_executable(main main.cpp Solver.cpp)
target_link_libraries(main cplex-library cplex-concert ilocplex cplex-cp )