gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
Merge #419
0 3 0
merge default
2 files changed with 49 insertions and 3 deletions:
↑ Collapse diff ↑
Ignore white space 48 line context
1 1
SET(COIN_ROOT_DIR "" CACHE PATH "COIN root directory")
2 2

	
3 3
FIND_PATH(COIN_INCLUDE_DIR coin/CoinUtilsConfig.h
4 4
  HINTS ${COIN_ROOT_DIR}/include
5 5
)
6 6
FIND_LIBRARY(COIN_CBC_LIBRARY
7 7
  NAMES Cbc libCbc
8
  HINTS ${COIN_ROOT_DIR}/lib/coin
8 9
  HINTS ${COIN_ROOT_DIR}/lib
9 10
)
10 11
FIND_LIBRARY(COIN_CBC_SOLVER_LIBRARY
11 12
  NAMES CbcSolver libCbcSolver
13
  HINTS ${COIN_ROOT_DIR}/lib/coin
12 14
  HINTS ${COIN_ROOT_DIR}/lib
13 15
)
14 16
FIND_LIBRARY(COIN_CGL_LIBRARY
15 17
  NAMES Cgl libCgl
18
  HINTS ${COIN_ROOT_DIR}/lib/coin
16 19
  HINTS ${COIN_ROOT_DIR}/lib
17 20
)
18 21
FIND_LIBRARY(COIN_CLP_LIBRARY
19 22
  NAMES Clp libClp
23
  HINTS ${COIN_ROOT_DIR}/lib/coin
20 24
  HINTS ${COIN_ROOT_DIR}/lib
21 25
)
22 26
FIND_LIBRARY(COIN_COIN_UTILS_LIBRARY
23 27
  NAMES CoinUtils libCoinUtils
28
  HINTS ${COIN_ROOT_DIR}/lib/coin
24 29
  HINTS ${COIN_ROOT_DIR}/lib
25 30
)
26 31
FIND_LIBRARY(COIN_OSI_LIBRARY
27 32
  NAMES Osi libOsi
33
  HINTS ${COIN_ROOT_DIR}/lib/coin
28 34
  HINTS ${COIN_ROOT_DIR}/lib
29 35
)
30 36
FIND_LIBRARY(COIN_OSI_CBC_LIBRARY
31 37
  NAMES OsiCbc libOsiCbc
38
  HINTS ${COIN_ROOT_DIR}/lib/coin
32 39
  HINTS ${COIN_ROOT_DIR}/lib
33 40
)
34 41
FIND_LIBRARY(COIN_OSI_CLP_LIBRARY
35 42
  NAMES OsiClp libOsiClp
43
  HINTS ${COIN_ROOT_DIR}/lib/coin
36 44
  HINTS ${COIN_ROOT_DIR}/lib
37 45
)
38 46
FIND_LIBRARY(COIN_OSI_VOL_LIBRARY
39 47
  NAMES OsiVol libOsiVol
48
  HINTS ${COIN_ROOT_DIR}/lib/coin
40 49
  HINTS ${COIN_ROOT_DIR}/lib
41 50
)
42 51
FIND_LIBRARY(COIN_VOL_LIBRARY
43 52
  NAMES Vol libVol
53
  HINTS ${COIN_ROOT_DIR}/lib/coin
44 54
  HINTS ${COIN_ROOT_DIR}/lib
45 55
)
46 56

	
47 57
INCLUDE(FindPackageHandleStandardArgs)
48 58
FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG
49 59
  COIN_INCLUDE_DIR
50 60
  COIN_CBC_LIBRARY
51 61
  COIN_CBC_SOLVER_LIBRARY
52 62
  COIN_CGL_LIBRARY
53 63
  COIN_CLP_LIBRARY
54 64
  COIN_COIN_UTILS_LIBRARY
55 65
  COIN_OSI_LIBRARY
56 66
  COIN_OSI_CBC_LIBRARY
57 67
  COIN_OSI_CLP_LIBRARY
58
  COIN_OSI_VOL_LIBRARY
59
  COIN_VOL_LIBRARY
68
  # COIN_OSI_VOL_LIBRARY
69
  # COIN_VOL_LIBRARY
60 70
)
61 71

	
62 72
IF(COIN_FOUND)
63 73
  SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR})
64
  SET(COIN_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY};${COIN_OSI_VOL_LIBRARY};${COIN_VOL_LIBRARY}")
74
  SET(COIN_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY}")
65 75
  SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY}")
66 76
  SET(COIN_CBC_LIBRARIES ${COIN_LIBRARIES})
67 77
ENDIF(COIN_FOUND)
68 78

	
69 79
MARK_AS_ADVANCED(
70 80
  COIN_INCLUDE_DIR
71 81
  COIN_CBC_LIBRARY
72 82
  COIN_CBC_SOLVER_LIBRARY
73 83
  COIN_CGL_LIBRARY
74 84
  COIN_CLP_LIBRARY
75 85
  COIN_COIN_UTILS_LIBRARY
76 86
  COIN_OSI_LIBRARY
77 87
  COIN_OSI_CBC_LIBRARY
78 88
  COIN_OSI_CLP_LIBRARY
79 89
  COIN_OSI_VOL_LIBRARY
80 90
  COIN_VOL_LIBRARY
81 91
)
82 92

	
83 93
IF(COIN_FOUND)
84 94
  SET(LEMON_HAVE_LP TRUE)
85 95
  SET(LEMON_HAVE_MIP TRUE)
86 96
  SET(LEMON_HAVE_CLP TRUE)
87 97
  SET(LEMON_HAVE_CBC TRUE)
88 98
ENDIF(COIN_FOUND)
Ignore white space 48 line context
... ...
@@ -51,89 +51,91 @@
51 51
  unionfind_test
52 52
)
53 53

	
54 54
IF(LEMON_HAVE_LP)
55 55
  IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
56 56
    ADD_EXECUTABLE(lp_test lp_test.cc)
57 57
  ELSE()
58 58
    ADD_EXECUTABLE(lp_test EXCLUDE_FROM_ALL lp_test.cc)
59 59
  ENDIF()
60 60

	
61 61
  SET(LP_TEST_LIBS lemon)
62 62

	
63 63
  IF(LEMON_HAVE_GLPK)
64 64
    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES})
65 65
  ENDIF()
66 66
  IF(LEMON_HAVE_CPLEX)
67 67
    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES})
68 68
  ENDIF()
69 69
  IF(LEMON_HAVE_CLP)
70 70
    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES})
71 71
  ENDIF()
72 72

	
73 73
  TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS})
74 74
  ADD_TEST(lp_test lp_test)
75
  ADD_DEPENDENCIES(check lp_test)
75 76

	
76 77
  IF(WIN32 AND LEMON_HAVE_GLPK)
77 78
    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
78 79
    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
79 80
    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
80 81
      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
81 82
      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
82 83
      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
83 84
    )
84 85
  ENDIF()
85 86

	
86 87
  IF(WIN32 AND LEMON_HAVE_CPLEX)
87 88
    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
88 89
    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
89 90
    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
90 91
      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
91 92
    )
92 93
  ENDIF()
93 94
ENDIF()
94 95

	
95 96
IF(LEMON_HAVE_MIP)
96 97
  IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
97 98
    ADD_EXECUTABLE(mip_test mip_test.cc)
98 99
  ELSE()
99 100
    ADD_EXECUTABLE(mip_test EXCLUDE_FROM_ALL mip_test.cc)
100 101
  ENDIF()
101 102

	
102 103
  SET(MIP_TEST_LIBS lemon)
103 104

	
104 105
  IF(LEMON_HAVE_GLPK)
105 106
    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES})
106 107
  ENDIF()
107 108
  IF(LEMON_HAVE_CPLEX)
108 109
    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES})
109 110
  ENDIF()
110 111
  IF(LEMON_HAVE_CBC)
111 112
    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES})
112 113
  ENDIF()
113 114

	
114 115
  TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS})
115 116
  ADD_TEST(mip_test mip_test)
117
  ADD_DEPENDENCIES(check mip_test)
116 118

	
117 119
  IF(WIN32 AND LEMON_HAVE_GLPK)
118 120
    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
119 121
    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
120 122
    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
121 123
      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
122 124
      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
123 125
      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
124 126
    )
125 127
  ENDIF()
126 128

	
127 129
  IF(WIN32 AND LEMON_HAVE_CPLEX)
128 130
    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
129 131
    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
130 132
    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
131 133
      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
132 134
    )
133 135
  ENDIF()
134 136
ENDIF()
135 137

	
136 138
FOREACH(TEST_NAME ${TESTS})
137 139
  IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
138 140
    ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
139 141
  ELSE()
Ignore white space 48 line context
... ...
@@ -251,26 +251,60 @@
251 251
    checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
252 252
    heapSortTest<IntHeap>();
253 253
    heapIncreaseTest<IntHeap>();
254 254

	
255 255
    typedef BinomialHeap<Prio, IntNodeMap > NodeHeap;
256 256
    checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
257 257
    dijkstraHeapTest<NodeHeap>(digraph, length, source);
258 258
  }
259 259

	
260 260
  // BucketHeap, SimpleBucketHeap
261 261
  {
262 262
    typedef BucketHeap<ItemIntMap> IntHeap;
263 263
    checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
264 264
    heapSortTest<IntHeap>();
265 265
    heapIncreaseTest<IntHeap>();
266 266

	
267 267
    typedef BucketHeap<IntNodeMap > NodeHeap;
268 268
    checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
269 269
    dijkstraHeapTest<NodeHeap>(digraph, length, source);
270 270

	
271 271
    typedef SimpleBucketHeap<ItemIntMap> SimpleIntHeap;
272 272
    heapSortTest<SimpleIntHeap>();
273 273
  }
274 274

	
275
  {
276
    typedef FibHeap<Prio, ItemIntMap> IntHeap;
277
    checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
278
    heapSortTest<IntHeap>();
279
    heapIncreaseTest<IntHeap>();
280

	
281
    typedef FibHeap<Prio, IntNodeMap > NodeHeap;
282
    checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
283
    dijkstraHeapTest<NodeHeap>(digraph, length, source);
284
  }
285

	
286
  {
287
    typedef RadixHeap<ItemIntMap> IntHeap;
288
    checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
289
    heapSortTest<IntHeap>();
290
    heapIncreaseTest<IntHeap>();
291

	
292
    typedef RadixHeap<IntNodeMap > NodeHeap;
293
    checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
294
    dijkstraHeapTest<NodeHeap>(digraph, length, source);
295
  }
296

	
297
  {
298
    typedef BucketHeap<ItemIntMap> IntHeap;
299
    checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
300
    heapSortTest<IntHeap>();
301
    heapIncreaseTest<IntHeap>();
302

	
303
    typedef BucketHeap<IntNodeMap > NodeHeap;
304
    checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
305
    dijkstraHeapTest<NodeHeap>(digraph, length, source);
306
  }
307

	
308

	
275 309
  return 0;
276 310
}
0 comments (0 inline)