# HG changeset patch # User Alpar Juttner # Date 1382612689 -7200 # Node ID 7a833615b2241e61dc6fb28c00ee826436096610 # Parent b6bad215bccd1a5db05c59457434fb7c34da89ea# Parent 62dba6c90f359c7a4f713131a5a025c1821d951e Merge bugfix #479 to branch 1.3 diff -r b6bad215bccd -r 7a833615b224 CMakeLists.txt --- a/CMakeLists.txt Thu Oct 17 15:09:30 2013 +0200 +++ b/CMakeLists.txt Thu Oct 24 13:04:49 2013 +0200 @@ -121,6 +121,9 @@ (NOT SOPLEX_FOUND AND (LEMON_DEFAULT_LP STREQUAL "SOPLEX"))) SET(LEMON_DEFAULT_LP ${DEFAULT_LP} CACHE STRING "Default LP solver backend (GLPK, CPLEX, CLP or SOPLEX)" FORCE) +ELSE() + SET(LEMON_DEFAULT_LP ${DEFAULT_LP} CACHE STRING + "Default LP solver backend (GLPK, CPLEX, CLP or SOPLEX)") ENDIF() IF(NOT LEMON_DEFAULT_MIP OR (NOT ILOG_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "CPLEX")) OR @@ -128,6 +131,9 @@ (NOT GLPK_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "GLPK"))) SET(LEMON_DEFAULT_MIP ${DEFAULT_MIP} CACHE STRING "Default MIP solver backend (GLPK, CPLEX or CBC)" FORCE) +ELSE() + SET(LEMON_DEFAULT_MIP ${DEFAULT_MIP} CACHE STRING + "Default MIP solver backend (GLPK, CPLEX or CBC)") ENDIF() diff -r b6bad215bccd -r 7a833615b224 lemon/lp.h --- a/lemon/lp.h Thu Oct 17 15:09:30 2013 +0200 +++ b/lemon/lp.h Thu Oct 24 13:04:49 2013 +0200 @@ -30,6 +30,8 @@ #include #elif LEMON_HAVE_CLP #include +#elif LEMON_HAVE_CBC +#include #endif ///\file @@ -79,7 +81,7 @@ typedef ClpLp Lp; #endif #if LEMON_DEFAULT_MIP == GLPK - typedef GlpkLp Mip; + typedef GlpkMip Mip; #elif LEMON_DEFAULT_MIP == CPLEX typedef CplexMip Mip; #elif LEMON_DEFAULT_MIP == CBC diff -r b6bad215bccd -r 7a833615b224 test/lp_test.cc --- a/test/lp_test.cc Thu Oct 17 15:09:30 2013 +0200 +++ b/test/lp_test.cc Thu Oct 24 13:04:49 2013 +0200 @@ -39,6 +39,9 @@ #include #endif +#ifdef LEMON_HAVE_LP +#include +#endif using namespace lemon; int countCols(LpBase & lp) { @@ -416,6 +419,15 @@ LpSkeleton lp_skel; lpTest(lp_skel); +#ifdef LEMON_HAVE_LP + { + Lp lp,lp2; + lpTest(lp); + aTest(lp2); + cloneTest(); + } +#endif + #ifdef LEMON_HAVE_GLPK { GlpkLp lp_glpk1,lp_glpk2; diff -r b6bad215bccd -r 7a833615b224 test/mip_test.cc --- a/test/mip_test.cc Thu Oct 17 15:09:30 2013 +0200 +++ b/test/mip_test.cc Thu Oct 24 13:04:49 2013 +0200 @@ -32,6 +32,10 @@ #include #endif +#ifdef LEMON_HAVE_MIP +#include +#endif + using namespace lemon; @@ -128,6 +132,14 @@ int main() { +#ifdef LEMON_HAVE_MIP + { + Mip mip1; + aTest(mip1); + cloneTest(); + } +#endif + #ifdef LEMON_HAVE_GLPK { GlpkMip mip1;