0
20
0
1
1
8
8
24
24
... | ... |
@@ -27,10 +27,12 @@ |
27 | 27 |
# C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning) |
28 | 28 |
# C4996: 'function': was declared deprecated |
29 | 29 |
ENDIF(MSVC) |
30 | 30 |
|
31 |
ADD_DEFINITIONS(-DHAVE_CONFIG_H) |
|
32 |
|
|
31 | 33 |
INCLUDE(CheckTypeSize) |
32 |
CHECK_TYPE_SIZE("long long" |
|
34 |
CHECK_TYPE_SIZE("long long" LEMON_LONG_LONG) |
|
33 | 35 |
|
34 | 36 |
ENABLE_TESTING() |
35 | 37 |
|
36 | 38 |
ADD_SUBDIRECTORY(lemon) |
... | ... |
@@ -60,9 +60,9 @@ |
60 | 60 |
COIN_VOL_LIBRARY |
61 | 61 |
) |
62 | 62 |
|
63 | 63 |
IF(COIN_FOUND) |
64 |
SET(HAVE_LP TRUE) |
|
65 |
SET(HAVE_MIP TRUE) |
|
66 |
SET(HAVE_CLP TRUE) |
|
67 |
SET(HAVE_CBC TRUE) |
|
64 |
SET(LEMON_HAVE_LP TRUE) |
|
65 |
SET(LEMON_HAVE_MIP TRUE) |
|
66 |
SET(LEMON_HAVE_CLP TRUE) |
|
67 |
SET(LEMON_HAVE_CBC TRUE) |
|
68 | 68 |
ENDIF(COIN_FOUND) |
... | ... |
@@ -20,8 +20,8 @@ |
20 | 20 |
|
21 | 21 |
MARK_AS_ADVANCED(CPLEX_LIBRARY CPLEX_INCLUDE_DIR CPLEX_BIN_DIR) |
22 | 22 |
|
23 | 23 |
IF(CPLEX_FOUND) |
24 |
SET(HAVE_LP TRUE) |
|
25 |
SET(HAVE_MIP TRUE) |
|
26 |
SET( |
|
24 |
SET(LEMON_HAVE_LP TRUE) |
|
25 |
SET(LEMON_HAVE_MIP TRUE) |
|
26 |
SET(LEMON_HAVE_CPLEX TRUE) |
|
27 | 27 |
ENDIF(CPLEX_FOUND) |
... | ... |
@@ -24,9 +24,9 @@ |
24 | 24 |
|
25 | 25 |
dnl Check the existence of long long type. |
26 | 26 |
AC_CHECK_TYPE(long long, [long_long_found=yes], [long_long_found=no]) |
27 | 27 |
if test x"$long_long_found" = x"yes"; then |
28 |
AC_DEFINE([ |
|
28 |
AC_DEFINE([LEMON_HAVE_LONG_LONG], [1], [Define to 1 if you have long long.]) |
|
29 | 29 |
fi |
30 | 30 |
|
31 | 31 |
dnl Checks for programs. |
32 | 32 |
AC_PROG_CXX |
... | ... |
@@ -17,32 +17,32 @@ |
17 | 17 |
random.cc |
18 | 18 |
bits/windows.cc |
19 | 19 |
) |
20 | 20 |
|
21 |
IF( |
|
21 |
IF(LEMON_HAVE_GLPK) |
|
22 | 22 |
SET(LEMON_SOURCES ${LEMON_SOURCES} glpk.cc) |
23 | 23 |
INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIRS}) |
24 | 24 |
IF(WIN32) |
25 | 25 |
INSTALL(FILES ${GLPK_BIN_DIR}/glpk.dll DESTINATION bin) |
26 | 26 |
INSTALL(FILES ${GLPK_BIN_DIR}/libltdl3.dll DESTINATION bin) |
27 | 27 |
INSTALL(FILES ${GLPK_BIN_DIR}/zlib1.dll DESTINATION bin) |
28 | 28 |
ENDIF(WIN32) |
29 |
ENDIF( |
|
29 |
ENDIF(LEMON_HAVE_GLPK) |
|
30 | 30 |
|
31 |
IF( |
|
31 |
IF(LEMON_HAVE_CPLEX) |
|
32 | 32 |
SET(LEMON_SOURCES ${LEMON_SOURCES} cplex.cc) |
33 | 33 |
INCLUDE_DIRECTORIES(${CPLEX_INCLUDE_DIRS}) |
34 |
ENDIF( |
|
34 |
ENDIF(LEMON_HAVE_CPLEX) |
|
35 | 35 |
|
36 |
IF( |
|
36 |
IF(LEMON_HAVE_CLP) |
|
37 | 37 |
SET(LEMON_SOURCES ${LEMON_SOURCES} clp.cc) |
38 | 38 |
INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS}) |
39 |
ENDIF( |
|
39 |
ENDIF(LEMON_HAVE_CLP) |
|
40 | 40 |
|
41 |
IF( |
|
41 |
IF(LEMON_HAVE_CBC) |
|
42 | 42 |
SET(LEMON_SOURCES ${LEMON_SOURCES} cbc.cc) |
43 | 43 |
INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS}) |
44 |
ENDIF( |
|
44 |
ENDIF(LEMON_HAVE_CBC) |
|
45 | 45 |
|
46 | 46 |
ADD_LIBRARY(lemon ${LEMON_SOURCES}) |
47 | 47 |
|
48 | 48 |
INSTALL( |
... | ... |
@@ -54,4 +54,9 @@ |
54 | 54 |
DIRECTORY . bits concepts |
55 | 55 |
DESTINATION include/lemon |
56 | 56 |
COMPONENT headers |
57 | 57 |
FILES_MATCHING PATTERN "*.h") |
58 |
|
|
59 |
INSTALL( |
|
60 |
FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h |
|
61 |
DESTINATION include/lemon |
|
62 |
COMPONENT headers) |
... | ... |
@@ -96,9 +96,9 @@ |
96 | 96 |
typedef VectorMap<_Graph, _Item, unsigned long> Map; |
97 | 97 |
}; |
98 | 98 |
|
99 | 99 |
|
100 |
#if defined |
|
100 |
#if defined LEMON_HAVE_LONG_LONG |
|
101 | 101 |
|
102 | 102 |
// long long |
103 | 103 |
template <typename _Graph, typename _Item> |
104 | 104 |
struct DefaultMapSelector<_Graph, _Item, signed long long> { |
1 |
#cmakedefine HAVE_LONG_LONG 1 |
|
2 |
#cmakedefine HAVE_LP 1 |
|
3 |
#cmakedefine HAVE_MIP 1 |
|
4 |
#cmakedefine HAVE_GLPK 1 |
|
5 |
#cmakedefine HAVE_CPLEX 1 |
|
6 |
#cmakedefine HAVE_CLP 1 |
|
7 |
#cmakedefine |
|
1 |
#cmakedefine LEMON_HAVE_LONG_LONG 1 |
|
2 |
#cmakedefine LEMON_HAVE_LP 1 |
|
3 |
#cmakedefine LEMON_HAVE_MIP 1 |
|
4 |
#cmakedefine LEMON_HAVE_GLPK 1 |
|
5 |
#cmakedefine LEMON_HAVE_CPLEX 1 |
|
6 |
#cmakedefine LEMON_HAVE_CLP 1 |
|
7 |
#cmakedefine LEMON_HAVE_CBC 1 |
1 | 1 |
/* Define to 1 if you have long long */ |
2 |
#undef |
|
2 |
#undef LEMON_HAVE_LONG_LONG |
|
3 | 3 |
|
4 | 4 |
/* Define to 1 if you have any LP solver. */ |
5 |
#undef |
|
5 |
#undef LEMON_HAVE_LP |
|
6 | 6 |
|
7 | 7 |
/* Define to 1 if you have any MIP solver. */ |
8 |
#undef |
|
8 |
#undef LEMON_HAVE_MIP |
|
9 | 9 |
|
10 | 10 |
/* Define to 1 if you have CPLEX. */ |
11 |
#undef |
|
11 |
#undef LEMON_HAVE_CPLEX |
|
12 | 12 |
|
13 | 13 |
/* Define to 1 if you have GLPK. */ |
14 |
#undef |
|
14 |
#undef LEMON_HAVE_GLPK |
|
15 | 15 |
|
16 | 16 |
/* Define to 1 if you have SOPLEX */ |
17 |
#undef |
|
17 |
#undef LEMON_HAVE_SOPLEX |
|
18 | 18 |
|
19 | 19 |
/* Define to 1 if you have CLP */ |
20 |
#undef |
|
20 |
#undef LEMON_HAVE_CLP |
|
21 | 21 |
|
22 | 22 |
/* Define to 1 if you have CBC */ |
23 |
#undef |
|
23 |
#undef LEMON_HAVE_CBC |
... | ... |
@@ -21,15 +21,15 @@ |
21 | 21 |
|
22 | 22 |
#include<lemon/config.h> |
23 | 23 |
|
24 | 24 |
|
25 |
#ifdef |
|
25 |
#ifdef LEMON_HAVE_GLPK |
|
26 | 26 |
#include <lemon/glpk.h> |
27 |
#elif |
|
27 |
#elif LEMON_HAVE_CPLEX |
|
28 | 28 |
#include <lemon/cplex.h> |
29 |
#elif |
|
29 |
#elif LEMON_HAVE_SOPLEX |
|
30 | 30 |
#include <lemon/soplex.h> |
31 |
#elif |
|
31 |
#elif LEMON_HAVE_CLP |
|
32 | 32 |
#include <lemon/clp.h> |
33 | 33 |
#endif |
34 | 34 |
|
35 | 35 |
///\file |
... | ... |
@@ -68,22 +68,22 @@ |
68 | 68 |
/// |
69 | 69 |
///Currently, it is either \c GlpkMip or \c CplexMip |
70 | 70 |
typedef GlpkMip Mip; |
71 | 71 |
#else |
72 |
#ifdef |
|
72 |
#ifdef LEMON_HAVE_GLPK |
|
73 | 73 |
# define LEMON_DEFAULT_LP GLPK |
74 | 74 |
typedef GlpkLp Lp; |
75 | 75 |
# define LEMON_DEFAULT_MIP GLPK |
76 | 76 |
typedef GlpkMip Mip; |
77 |
#elif |
|
77 |
#elif LEMON_HAVE_CPLEX |
|
78 | 78 |
# define LEMON_DEFAULT_LP CPLEX |
79 | 79 |
typedef CplexLp Lp; |
80 | 80 |
# define LEMON_DEFAULT_MIP CPLEX |
81 | 81 |
typedef CplexMip Mip; |
82 |
#elif |
|
82 |
#elif LEMON_HAVE_SOPLEX |
|
83 | 83 |
# define DEFAULT_LP SOPLEX |
84 | 84 |
typedef SoplexLp Lp; |
85 |
#elif |
|
85 |
#elif LEMON_HAVE_CLP |
|
86 | 86 |
# define DEFAULT_LP CLP |
87 | 87 |
typedef ClpLp Lp; |
88 | 88 |
#endif |
89 | 89 |
#endif |
... | ... |
@@ -54,11 +54,11 @@ |
54 | 54 |
LDFLAGS="$lx_save_ldflags" |
55 | 55 |
LIBS="$lx_save_libs" |
56 | 56 |
|
57 | 57 |
if test x"$lx_clp_found" = x"yes"; then |
58 |
AC_DEFINE([ |
|
58 |
AC_DEFINE([LEMON_HAVE_CLP], [1], [Define to 1 if you have CLP.]) |
|
59 | 59 |
lx_lp_found=yes |
60 |
AC_DEFINE([ |
|
60 |
AC_DEFINE([LEMON_HAVE_LP], [1], [Define to 1 if you have any LP solver.]) |
|
61 | 61 |
AC_MSG_RESULT([yes]) |
62 | 62 |
else |
63 | 63 |
CLP_CXXFLAGS="" |
64 | 64 |
CLP_LDFLAGS="" |
... | ... |
@@ -114,13 +114,13 @@ |
114 | 114 |
LDFLAGS="$lx_save_ldflags" |
115 | 115 |
LIBS="$lx_save_libs" |
116 | 116 |
|
117 | 117 |
if test x"$lx_cbc_found" = x"yes"; then |
118 |
AC_DEFINE([ |
|
118 |
AC_DEFINE([LEMON_HAVE_CBC], [1], [Define to 1 if you have CBC.]) |
|
119 | 119 |
lx_lp_found=yes |
120 |
AC_DEFINE([ |
|
120 |
AC_DEFINE([LEMON_HAVE_LP], [1], [Define to 1 if you have any LP solver.]) |
|
121 | 121 |
lx_mip_found=yes |
122 |
AC_DEFINE([ |
|
122 |
AC_DEFINE([LEMON_HAVE_MIP], [1], [Define to 1 if you have any MIP solver.]) |
|
123 | 123 |
AC_MSG_RESULT([yes]) |
124 | 124 |
else |
125 | 125 |
CBC_CXXFLAGS="" |
126 | 126 |
CBC_LDFLAGS="" |
... | ... |
@@ -60,13 +60,13 @@ |
60 | 60 |
LDFLAGS="$lx_save_ldflags" |
61 | 61 |
LIBS="$lx_save_libs" |
62 | 62 |
|
63 | 63 |
if test x"$lx_cplex_found" = x"yes"; then |
64 |
AC_DEFINE([ |
|
64 |
AC_DEFINE([LEMON_HAVE_CPLEX], [1], [Define to 1 if you have CPLEX.]) |
|
65 | 65 |
lx_lp_found=yes |
66 |
AC_DEFINE([ |
|
66 |
AC_DEFINE([LEMON_HAVE_LP], [1], [Define to 1 if you have any LP solver.]) |
|
67 | 67 |
lx_mip_found=yes |
68 |
AC_DEFINE([ |
|
68 |
AC_DEFINE([LEMON_HAVE_MIP], [1], [Define to 1 if you have any MIP solver.]) |
|
69 | 69 |
AC_MSG_RESULT([yes]) |
70 | 70 |
else |
71 | 71 |
CPLEX_CFLAGS="" |
72 | 72 |
CPLEX_LDFLAGS="" |
... | ... |
@@ -63,13 +63,13 @@ |
63 | 63 |
LDFLAGS="$lx_save_ldflags" |
64 | 64 |
LIBS="$lx_save_libs" |
65 | 65 |
|
66 | 66 |
if test x"$lx_glpk_found" = x"yes"; then |
67 |
AC_DEFINE([ |
|
67 |
AC_DEFINE([LEMON_HAVE_GLPK], [1], [Define to 1 if you have GLPK.]) |
|
68 | 68 |
lx_lp_found=yes |
69 |
AC_DEFINE([ |
|
69 |
AC_DEFINE([LEMON_HAVE_LP], [1], [Define to 1 if you have any LP solver.]) |
|
70 | 70 |
lx_mip_found=yes |
71 |
AC_DEFINE([ |
|
71 |
AC_DEFINE([LEMON_HAVE_MIP], [1], [Define to 1 if you have any MIP solver.]) |
|
72 | 72 |
AC_MSG_RESULT([yes]) |
73 | 73 |
else |
74 | 74 |
GLPK_CFLAGS="" |
75 | 75 |
GLPK_LDFLAGS="" |
... | ... |
@@ -54,11 +54,11 @@ |
54 | 54 |
LDFLAGS="$lx_save_ldflags" |
55 | 55 |
LIBS="$lx_save_libs" |
56 | 56 |
|
57 | 57 |
if test x"$lx_soplex_found" = x"yes"; then |
58 |
AC_DEFINE([ |
|
58 |
AC_DEFINE([LEMON_HAVE_SOPLEX], [1], [Define to 1 if you have SOPLEX.]) |
|
59 | 59 |
lx_lp_found=yes |
60 |
AC_DEFINE([ |
|
60 |
AC_DEFINE([LEMON_HAVE_LP], [1], [Define to 1 if you have any LP solver.]) |
|
61 | 61 |
AC_MSG_RESULT([yes]) |
62 | 62 |
else |
63 | 63 |
SOPLEX_CXXFLAGS="" |
64 | 64 |
SOPLEX_LDFLAGS="" |
... | ... |
@@ -35,73 +35,73 @@ |
35 | 35 |
suurballe_test |
36 | 36 |
time_measure_test |
37 | 37 |
unionfind_test) |
38 | 38 |
|
39 |
IF( |
|
39 |
IF(LEMON_HAVE_LP) |
|
40 | 40 |
ADD_EXECUTABLE(lp_test lp_test.cc) |
41 | 41 |
SET(LP_TEST_LIBS lemon) |
42 |
IF( |
|
42 |
IF(LEMON_HAVE_GLPK) |
|
43 | 43 |
SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES}) |
44 |
ENDIF(HAVE_GLPK) |
|
45 |
IF(HAVE_CPLEX) |
|
44 |
ENDIF(LEMON_HAVE_GLPK) |
|
45 |
IF(LEMON_HAVE_CPLEX) |
|
46 | 46 |
SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES}) |
47 |
ENDIF(HAVE_CPLEX) |
|
48 |
IF(HAVE_CLP) |
|
47 |
ENDIF(LEMON_HAVE_CPLEX) |
|
48 |
IF(LEMON_HAVE_CLP) |
|
49 | 49 |
SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES}) |
50 |
ENDIF( |
|
50 |
ENDIF(LEMON_HAVE_CLP) |
|
51 | 51 |
TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS}) |
52 | 52 |
ADD_TEST(lp_test lp_test) |
53 | 53 |
|
54 |
IF(WIN32 AND |
|
54 |
IF(WIN32 AND LEMON_HAVE_GLPK) |
|
55 | 55 |
GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION) |
56 | 56 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
57 | 57 |
ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD |
58 | 58 |
COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH} |
59 | 59 |
COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH} |
60 | 60 |
COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH} |
61 | 61 |
) |
62 |
ENDIF(WIN32 AND HAVE_GLPK) |
|
63 |
IF(WIN32 AND HAVE_CPLEX) |
|
62 |
ENDIF(WIN32 AND LEMON_HAVE_GLPK) |
|
63 |
IF(WIN32 AND LEMON_HAVE_CPLEX) |
|
64 | 64 |
GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION) |
65 | 65 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
66 | 66 |
ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD |
67 | 67 |
COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH} |
68 | 68 |
) |
69 |
ENDIF(WIN32 AND HAVE_CPLEX) |
|
70 |
ENDIF(HAVE_LP) |
|
69 |
ENDIF(WIN32 AND LEMON_HAVE_CPLEX) |
|
70 |
ENDIF(LEMON_HAVE_LP) |
|
71 | 71 |
|
72 |
IF( |
|
72 |
IF(LEMON_HAVE_MIP) |
|
73 | 73 |
ADD_EXECUTABLE(mip_test mip_test.cc) |
74 | 74 |
SET(MIP_TEST_LIBS lemon) |
75 |
IF( |
|
75 |
IF(LEMON_HAVE_GLPK) |
|
76 | 76 |
SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES}) |
77 |
ENDIF(HAVE_GLPK) |
|
78 |
IF(HAVE_CPLEX) |
|
77 |
ENDIF(LEMON_HAVE_GLPK) |
|
78 |
IF(LEMON_HAVE_CPLEX) |
|
79 | 79 |
SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES}) |
80 |
ENDIF(HAVE_CPLEX) |
|
81 |
IF(HAVE_CBC) |
|
80 |
ENDIF(LEMON_HAVE_CPLEX) |
|
81 |
IF(LEMON_HAVE_CBC) |
|
82 | 82 |
SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES}) |
83 |
ENDIF( |
|
83 |
ENDIF(LEMON_HAVE_CBC) |
|
84 | 84 |
TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS}) |
85 | 85 |
ADD_TEST(mip_test mip_test) |
86 | 86 |
|
87 |
IF(WIN32 AND |
|
87 |
IF(WIN32 AND LEMON_HAVE_GLPK) |
|
88 | 88 |
GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION) |
89 | 89 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
90 | 90 |
ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD |
91 | 91 |
COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH} |
92 | 92 |
COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH} |
93 | 93 |
COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH} |
94 | 94 |
) |
95 |
ENDIF(WIN32 AND HAVE_GLPK) |
|
96 |
IF(WIN32 AND HAVE_CPLEX) |
|
95 |
ENDIF(WIN32 AND LEMON_HAVE_GLPK) |
|
96 |
IF(WIN32 AND LEMON_HAVE_CPLEX) |
|
97 | 97 |
GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION) |
98 | 98 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
99 | 99 |
ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD |
100 | 100 |
COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH} |
101 | 101 |
) |
102 |
ENDIF(WIN32 AND HAVE_CPLEX) |
|
103 |
ENDIF(HAVE_MIP) |
|
102 |
ENDIF(WIN32 AND LEMON_HAVE_CPLEX) |
|
103 |
ENDIF(LEMON_HAVE_MIP) |
|
104 | 104 |
|
105 | 105 |
FOREACH(TEST_NAME ${TESTS}) |
106 | 106 |
ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc) |
107 | 107 |
TARGET_LINK_LIBRARIES(${TEST_NAME} lemon) |
... | ... |
@@ -24,21 +24,21 @@ |
24 | 24 |
#ifdef HAVE_CONFIG_H |
25 | 25 |
#include <lemon/config.h> |
26 | 26 |
#endif |
27 | 27 |
|
28 |
#ifdef |
|
28 |
#ifdef LEMON_HAVE_GLPK |
|
29 | 29 |
#include <lemon/glpk.h> |
30 | 30 |
#endif |
31 | 31 |
|
32 |
#ifdef |
|
32 |
#ifdef LEMON_HAVE_CPLEX |
|
33 | 33 |
#include <lemon/cplex.h> |
34 | 34 |
#endif |
35 | 35 |
|
36 |
#ifdef |
|
36 |
#ifdef LEMON_HAVE_SOPLEX |
|
37 | 37 |
#include <lemon/soplex.h> |
38 | 38 |
#endif |
39 | 39 |
|
40 |
#ifdef |
|
40 |
#ifdef LEMON_HAVE_CLP |
|
41 | 41 |
#include <lemon/clp.h> |
42 | 42 |
#endif |
43 | 43 |
|
44 | 44 |
using namespace lemon; |
... | ... |
@@ -378,18 +378,18 @@ |
378 | 378 |
{ |
379 | 379 |
LpSkeleton lp_skel; |
380 | 380 |
lpTest(lp_skel); |
381 | 381 |
|
382 |
#ifdef |
|
382 |
#ifdef LEMON_HAVE_GLPK |
|
383 | 383 |
{ |
384 | 384 |
GlpkLp lp_glpk1,lp_glpk2; |
385 | 385 |
lpTest(lp_glpk1); |
386 | 386 |
aTest(lp_glpk2); |
387 | 387 |
cloneTest<GlpkLp>(); |
388 | 388 |
} |
389 | 389 |
#endif |
390 | 390 |
|
391 |
#ifdef |
|
391 |
#ifdef LEMON_HAVE_CPLEX |
|
392 | 392 |
try { |
393 | 393 |
CplexLp lp_cplex1,lp_cplex2; |
394 | 394 |
lpTest(lp_cplex1); |
395 | 395 |
aTest(lp_cplex2); |
... | ... |
@@ -398,18 +398,18 @@ |
398 | 398 |
check(false, error.what()); |
399 | 399 |
} |
400 | 400 |
#endif |
401 | 401 |
|
402 |
#ifdef |
|
402 |
#ifdef LEMON_HAVE_SOPLEX |
|
403 | 403 |
{ |
404 | 404 |
SoplexLp lp_soplex1,lp_soplex2; |
405 | 405 |
lpTest(lp_soplex1); |
406 | 406 |
aTest(lp_soplex2); |
407 | 407 |
cloneTest<SoplexLp>(); |
408 | 408 |
} |
409 | 409 |
#endif |
410 | 410 |
|
411 |
#ifdef |
|
411 |
#ifdef LEMON_HAVE_CLP |
|
412 | 412 |
{ |
413 | 413 |
ClpLp lp_clp1,lp_clp2; |
414 | 414 |
lpTest(lp_clp1); |
415 | 415 |
aTest(lp_clp2); |
... | ... |
@@ -21,17 +21,17 @@ |
21 | 21 |
#ifdef HAVE_CONFIG_H |
22 | 22 |
#include <lemon/config.h> |
23 | 23 |
#endif |
24 | 24 |
|
25 |
#ifdef |
|
25 |
#ifdef LEMON_HAVE_CPLEX |
|
26 | 26 |
#include <lemon/cplex.h> |
27 | 27 |
#endif |
28 | 28 |
|
29 |
#ifdef |
|
29 |
#ifdef LEMON_HAVE_GLPK |
|
30 | 30 |
#include <lemon/glpk.h> |
31 | 31 |
#endif |
32 | 32 |
|
33 |
#ifdef |
|
33 |
#ifdef LEMON_HAVE_CBC |
|
34 | 34 |
#include <lemon/cbc.h> |
35 | 35 |
#endif |
36 | 36 |
|
37 | 37 |
|
... | ... |
@@ -128,17 +128,17 @@ |
128 | 128 |
|
129 | 129 |
int main() |
130 | 130 |
{ |
131 | 131 |
|
132 |
#ifdef |
|
132 |
#ifdef LEMON_HAVE_GLPK |
|
133 | 133 |
{ |
134 | 134 |
GlpkMip mip1; |
135 | 135 |
aTest(mip1); |
136 | 136 |
cloneTest<GlpkMip>(); |
137 | 137 |
} |
138 | 138 |
#endif |
139 | 139 |
|
140 |
#ifdef |
|
140 |
#ifdef LEMON_HAVE_CPLEX |
|
141 | 141 |
try { |
142 | 142 |
CplexMip mip2; |
143 | 143 |
aTest(mip2); |
144 | 144 |
cloneTest<CplexMip>(); |
... | ... |
@@ -146,9 +146,9 @@ |
146 | 146 |
check(false, error.what()); |
147 | 147 |
} |
148 | 148 |
#endif |
149 | 149 |
|
150 |
#ifdef |
|
150 |
#ifdef LEMON_HAVE_CBC |
|
151 | 151 |
{ |
152 | 152 |
CbcMip mip1; |
153 | 153 |
aTest(mip1); |
154 | 154 |
cloneTest<CbcMip>(); |
... | ... |
@@ -199,9 +199,9 @@ |
199 | 199 |
" input/output will be used instead.") |
200 | 200 |
.boolOption("q", "Do not print any report") |
201 | 201 |
.boolOption("int","Use 'int' for capacities, costs etc. (default)") |
202 | 202 |
.optionGroup("datatype","int") |
203 |
#ifdef |
|
203 |
#ifdef LEMON_HAVE_LONG_LONG |
|
204 | 204 |
.boolOption("long","Use 'long long' for capacities, costs etc.") |
205 | 205 |
.optionGroup("datatype","long") |
206 | 206 |
#endif |
207 | 207 |
.boolOption("double","Use 'double' for capacities, costs etc.") |
... | ... |
@@ -266,9 +266,9 @@ |
266 | 266 |
if(ap.given("double")) |
267 | 267 |
solve<double>(ap,is,os,desc); |
268 | 268 |
else if(ap.given("ldouble")) |
269 | 269 |
solve<long double>(ap,is,os,desc); |
270 |
#ifdef |
|
270 |
#ifdef LEMON_HAVE_LONG_LONG |
|
271 | 271 |
else if(ap.given("long")) |
272 | 272 |
solve<long long>(ap,is,os,desc); |
273 | 273 |
#endif |
274 | 274 |
else solve<int>(ap,is,os,desc); |
0 comments (0 inline)