-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
61 lines (41 loc) · 1.56 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
cmake_minimum_required(VERSION 3.22)
project(scot VERSION 1.0.0 DESCRIPTION "Distributed Sparse Convex Optimization Toolkit")
find_package(MPI REQUIRED)
set(CMAKE_CXX_FLAGS "-O2")
set(CMAKE_CXX_COMPILER mpicxx)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_subdirectory(DOSE)
add_subdirectory(src/Algorithm)
add_subdirectory(src/Tasks)
add_subdirectory(src/MIPSolver)
add_subdirectory(src/Model)
add_subdirectory(src/Solver)
add_subdirectory(src/PrimalSolver)
add_executable(${PROJECT_NAME}
src/scot.cpp
src/cli_utils.cpp
src/cli_utils.h
)
target_include_directories(${PROJECT_NAME} PUBLIC
"${PROJECT_SOURCE_DIR}/DOSE"
"${PROJECT_SOURCE_DIR}/ExternLibs"
"${PROJECT_SOURCE_DIR}/ExternLibs/spdlog"
"$ENV{GUROBI_HOME}/include")
target_link_directories(${PROJECT_NAME} PUBLIC
"${PROJECT_SOURCE_DIR}/ExternLibs/spdlog/lib"
"${PROJECT_SOURCE_DIR}/ExternLibs/fmt/lib"
"$ENV{GUROBI_HOME}/lib"
"${MPI_INCLUDE_PATH}")
target_link_libraries(${PROJECT_NAME} dose)
target_link_libraries(${PROJECT_NAME} algorithms)
target_link_libraries(${PROJECT_NAME} tasks)
target_link_libraries(${PROJECT_NAME} mip)
target_link_libraries(${PROJECT_NAME} model)
target_link_libraries(${PROJECT_NAME} solver)
target_link_libraries(${PROJECT_NAME} primal)
target_link_libraries(${PROJECT_NAME} spdlog.a)
target_link_libraries(${PROJECT_NAME} fmt.a)
#set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/scot_framework)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
install(TARGETS scot DESTINATION bin)