-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
79 lines (65 loc) · 2.36 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
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(clusterisator)
SET(XPRESS_DIR)
SET(CPLEX_DIR)
OPTION( WITH_TESTS "Build tests" OFF)
OPTION( WITH_PROF "Build with profiling" OFF)
OPTION( WITH_DEBUG "Build in debug mode" OFF)
INCLUDE_DIRECTORIES( . )
MESSAGE("CMAKE_BINARY_DIR : ${CMAKE_BINARY_DIR}")
MESSAGE("CMAKE_SOURCE_DIR : ${CMAKE_SOURCE_DIR}")
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
SET( LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
IF( WIN32 )
SET( CMAKE_CONFIGURATION_TYPES "Debug;Release;" CACHE STRING "limited configs" FORCE)
SET( CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1" )
SET( CMAKE_CXX_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG")
ELSE()
SET ( CMAKE_BUILD_TYPE "RELEASE" )
# SET ( CMAKE_BUILD_TYPE "DEBUG" )
# IF( WITH_DEBUG )
# SET ( CMAKE_BUILD_TYPE "DEBUG" )
# ELSE( WITH_DEBUG )
# SET ( CMAKE_BUILD_TYPE "RELEASE" )
# ENDIF( WITH_DEBUG )
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -DNDEBUG")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -pedantic -fmessage-length=0 -fPIC" )
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-conversion -Wno-sign-compare")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-strict-aliasing -Wno-unused-parameter")
ENDIF( WIN32 )
SET(CPLEX_INC $ENV{CPLEXINC})
SET(CPLEX_LIB $ENV{CPLEXLIB})
SET(CPLEX_BIN $ENV{CPLEXBIN})
IF(NOT ${CPLEX_INC} STREQUAL "")
INCLUDE_DIRECTORIES( ${CPLEX_INC} )
IF(NOT WIN32)
STRING(REGEX REPLACE ":" ";" CPLEX_LIB ${CPLEX_LIB})
ENDIF()
MESSAGE("CPLEX_INC is ${CPLEX_INC}")
MESSAGE("CPLEX_LIB is ${CPLEX_LIB}")
MESSAGE("CPLEX_BIN is ${CPLEX_BIN}")
ELSE()
ADD_DEFINITIONS(-D__LAZY_CPLEX__)
ENDIF()
SET(XPRESS_DIR})
#SET(XPRESS_DIR $ENV{XPRESSDIR})
IF(NOT ${XPRESS_DIR} STREQUAL "")
SET(XPRESS_INC ${XPRESS_DIR}/include )
SET(XPRESS_LIB ${XPRESS_DIR}/lib )
INCLUDE_DIRECTORIES( ${XPRESS_INC} )
MESSAGE("XPRESS_DIR is ${XPRESS_DIR}")
MESSAGE("XPRESS_INC is ${XPRESS_INC}")
MESSAGE("XPRESS_LIB is ${XPRESS_LIB}")
ELSE()
ADD_DEFINITIONS(-D__LAZY_XPRESS__)
ENDIF()
INCLUDE_DIRECTORIES( clustering bipartite_data unipartite_data columnsgeneration heuristic mip_solver)
INCLUDE_DIRECTORIES( $ENV{MOSEKDIR} )
#ADD_SUBDIRECTORY(sdp_solver)
ADD_SUBDIRECTORY(clustering)
ADD_SUBDIRECTORY(mip_solver)
ADD_SUBDIRECTORY(heuristic)
ADD_SUBDIRECTORY(columnsgeneration)
ADD_SUBDIRECTORY(bipartite_data)
ADD_SUBDIRECTORY(unipartite_data)
ADD_SUBDIRECTORY(exe)