Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 1185)
+++ CMakeLists.txt	(revision 1232)
@@ -62,7 +62,62 @@
 FIND_PACKAGE(Doxygen)
 FIND_PACKAGE(Ghostscript)
-FIND_PACKAGE(GLPK 4.33)
-FIND_PACKAGE(CPLEX)
-FIND_PACKAGE(COIN)
+
+SET(LEMON_ENABLE_GLPK YES CACHE STRING "Enable GLPK solver backend.")
+SET(LEMON_ENABLE_ILOG YES CACHE STRING "Enable ILOG (CPLEX) solver backend.")
+SET(LEMON_ENABLE_COIN YES CACHE STRING "Enable COIN solver backend.")
+
+IF(LEMON_ENABLE_GLPK) 
+  FIND_PACKAGE(GLPK 4.33)
+ENDIF(LEMON_ENABLE_GLPK)
+IF(LEMON_ENABLE_ILOG)
+  FIND_PACKAGE(ILOG)
+ENDIF(LEMON_ENABLE_ILOG)
+IF(LEMON_ENABLE_COIN)
+  FIND_PACKAGE(COIN)
+ENDIF(LEMON_ENABLE_COIN)
+
+IF(GLPK_FOUND)
+  SET(LEMON_HAVE_LP TRUE)
+  SET(LEMON_HAVE_MIP TRUE)
+  SET(LEMON_HAVE_GLPK TRUE)
+ENDIF(GLPK_FOUND)
+IF(ILOG_FOUND)
+  SET(LEMON_HAVE_LP TRUE)
+  SET(LEMON_HAVE_MIP TRUE)
+  SET(LEMON_HAVE_ILOG TRUE)
+ENDIF(ILOG_FOUND)
+IF(COIN_FOUND)
+  SET(LEMON_HAVE_LP TRUE)
+  SET(LEMON_HAVE_MIP TRUE)
+  SET(LEMON_HAVE_CLP TRUE)
+  SET(LEMON_HAVE_CBC TRUE)
+ENDIF(COIN_FOUND)
+
+IF(ILOG_FOUND)
+  SET(DEFAULT_LP "CPLEX")
+  SET(DEFAULT_MIP "CPLEX")
+ELSEIF(COIN_FOUND)
+  SET(DEFAULT_LP "CLP")
+  SET(DEFAULT_MIP "CBC")
+ELSEIF(GLPK_FOUND)
+  SET(DEFAULT_LP "GLPK")
+  SET(DEFAULT_MIP "GLPK")
+ENDIF()
+
+IF(NOT LEMON_DEFAULT_LP OR
+    (NOT ILOG_FOUND AND (LEMON_DEFAULT_LP STREQUAL "CPLEX")) OR
+    (NOT COIN_FOUND AND (LEMON_DEFAULT_LP STREQUAL "CLP")) OR
+    (NOT GLPK_FOUND AND (LEMON_DEFAULT_LP STREQUAL "GLPK")))
+  SET(LEMON_DEFAULT_LP ${DEFAULT_LP} CACHE STRING
+    "Default LP solver backend (GLPK, CPLEX or CLP)" FORCE)
+ENDIF()
+IF(NOT LEMON_DEFAULT_MIP OR
+    (NOT ILOG_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "CPLEX")) OR
+    (NOT COIN_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "CBC")) OR
+    (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)
+ENDIF()
+
 
 IF(DEFINED ENV{LEMON_CXX_WARNING})
Index: INSTALL
===================================================================
--- INSTALL	(revision 1208)
+++ INSTALL	(revision 1233)
@@ -135,9 +135,27 @@
 
   
+-DLEMON_ENABLE_GLPK=NO
+-DLEMON_ENABLE_COIN=NO
+-DLEMON_ENABLE_ILOG=NO
+
+  Enable optional third party libraries. They are all enabled by default. 
+
+-DLEMON_DEFAULT_LP=GLPK
+
+  Sets the default LP solver backend. The supported values are
+  CPLEX, CLP and GLPK. By default, it is set to the first one which
+  is enabled and succesfully discovered.
+
+-DLEMON_DEFAULT_MIP=GLPK
+
+  Sets the default MIP solver backend. The supported values are
+  CPLEX, CBC and GLPK. By default, it is set to the first one which
+  is enabled and succesfully discovered.
+
 -DGLPK_ROOT_DIR=DIRECTORY
 -DCOIN_ROOT_DIR=DIRECTORY
--DCPLEX_ROOT_DIR=DIRECTORY
+-DILOG_ROOT_DIR=DIRECTORY
 
-  Install root directory prefixes of optional third party libraries.
+  Root directory prefixes of optional third party libraries.
 
 Makefile Variables
Index: cmake/FindCOIN.cmake
===================================================================
--- cmake/FindCOIN.cmake	(revision 1120)
+++ cmake/FindCOIN.cmake	(revision 1232)
@@ -109,9 +109,2 @@
   COIN_BZ2_LIBRARY
 )
-
-IF(COIN_FOUND)
-  SET(LEMON_HAVE_LP TRUE)
-  SET(LEMON_HAVE_MIP TRUE)
-  SET(LEMON_HAVE_CLP TRUE)
-  SET(LEMON_HAVE_CBC TRUE)
-ENDIF(COIN_FOUND)
Index: ake/FindCPLEX.cmake
===================================================================
--- cmake/FindCPLEX.cmake	(revision 1119)
+++ 	(revision )
@@ -1,40 +1,0 @@
-SET(CPLEX_ROOT_DIR "" CACHE PATH "CPLEX root directory")
-
-FIND_PATH(CPLEX_INCLUDE_DIR
-  ilcplex/cplex.h
-  PATHS "C:/ILOG/CPLEX/include"
-  PATHS "/opt/ilog/cplex/include"
-  HINTS ${CPLEX_ROOT_DIR}/include
-)
-FIND_LIBRARY(CPLEX_LIBRARY
-  cplex
-  PATHS "C:/ILOG/CPLEX/lib/msvc7/stat_mda"
-  PATHS "/opt/ilog/cplex/bin"
-  HINTS ${CPLEX_ROOT_DIR}/bin
-  HINTS ${CPLEX_ROOT_DIR}/lib
-)
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPLEX DEFAULT_MSG CPLEX_LIBRARY CPLEX_INCLUDE_DIR)
-
-FIND_PATH(CPLEX_BIN_DIR
-  cplex.dll
-  PATHS "C:/ILOG/CPLEX/bin/x86_win32"
-  HINTS ${CPLEX_ROOT_DIR}/bin
-)
-
-IF(CPLEX_FOUND)
-  SET(CPLEX_INCLUDE_DIRS ${CPLEX_INCLUDE_DIR})
-  SET(CPLEX_LIBRARIES ${CPLEX_LIBRARY})
-  IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
-    SET(CPLEX_LIBRARIES "${CPLEX_LIBRARIES};m;pthread")
-  ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
-ENDIF(CPLEX_FOUND)
-
-MARK_AS_ADVANCED(CPLEX_LIBRARY CPLEX_INCLUDE_DIR CPLEX_BIN_DIR)
-
-IF(CPLEX_FOUND)
-  SET(LEMON_HAVE_LP TRUE)
-  SET(LEMON_HAVE_MIP TRUE)
-  SET(LEMON_HAVE_CPLEX TRUE)
-ENDIF(CPLEX_FOUND)
Index: cmake/FindGLPK.cmake
===================================================================
--- cmake/FindGLPK.cmake	(revision 685)
+++ cmake/FindGLPK.cmake	(revision 1232)
@@ -54,8 +54,2 @@
 
 MARK_AS_ADVANCED(GLPK_LIBRARY GLPK_INCLUDE_DIR GLPK_BIN_DIR)
-
-IF(GLPK_FOUND)
-  SET(LEMON_HAVE_LP TRUE)
-  SET(LEMON_HAVE_MIP TRUE)
-  SET(LEMON_HAVE_GLPK TRUE)
-ENDIF(GLPK_FOUND)
Index: cmake/FindILOG.cmake
===================================================================
--- cmake/FindILOG.cmake	(revision 1232)
+++ cmake/FindILOG.cmake	(revision 1232)
@@ -0,0 +1,102 @@
+FIND_PATH(ILOG_ROOT_DIR
+  NAMES cplex
+  DOC "CPLEX STUDIO root directory"
+  PATHS /opt/ibm/ILOG /usr/local/ibm/ILOG /usr/local/ILOG /usr/local/ilog
+  PATHS "$ENV{HOME}/ILOG" "$ENV{HOME}/.local/ILOG"
+  PATHS "$ENV{HOME}/ibm/ILOG" "$ENV{HOME}/.local/ibm/ILOG"
+  PATHS "C:/Program Files/IBM/ILOG" 
+  PATH_SUFFIXES "CPLEX_Studio126" "CPLEX_Studio125"
+  "CPLEX_Studio124" "CPLEX_Studio123" "CPLEX_Studio122"
+  NO_DEFAULT_PATH
+)
+
+IF(WIN32)
+  IF(MSVC_VERSION STREQUAL "1400")
+    SET(ILOG_WIN_COMPILER "windows_vs2005")
+  ELSEIF(MSVC_VERSION STREQUAL "1500")
+    SET(ILOG_WIN_COMPILER "windows_vs2008")
+  ELSEIF(MSVC_VERSION STREQUAL "1600")
+    SET(ILOG_WIN_COMPILER "windows_vs2010")
+  ELSE()
+    SET(ILOG_WIN_COMPILER "windows_vs2008")
+  ENDIF()
+  IF(CMAKE_CL_64)
+    SET(ILOG_WIN_COMPILER "x64_${ILOG_WIN_COMPILER}")
+    SET(ILOG_WIN_PLATFORM "x64_win32")
+  ELSE()
+    SET(ILOG_WIN_COMPILER "x86_${ILOG_WIN_COMPILER}")
+    SET(ILOG_WIN_PLATFORM "x86_win32")
+  ENDIF()
+ENDIF()
+
+FIND_PATH(ILOG_CPLEX_ROOT_DIR
+  NAMES include/ilcplex
+  HINTS ${ILOG_ROOT_DIR}/cplex ${ILOG_ROOT_DIR}/cplex121
+  ${ILOG_ROOT_DIR}/cplex122 ${ILOG_ROOT_DIR}/cplex123
+  DOC "CPLEX root directory"
+  NO_DEFAULT_PATH
+)
+
+FIND_PATH(ILOG_CONCERT_ROOT_DIR
+  NAMES include/ilconcert
+  HINTS ${ILOG_ROOT_DIR}/concert ${ILOG_ROOT_DIR}/concert29
+  DOC "CONCERT root directory"
+  NO_DEFAULT_PATH
+)
+
+FIND_PATH(ILOG_CPLEX_INCLUDE_DIR
+  ilcplex/cplex.h
+  HINTS ${ILOG_CPLEX_ROOT_DIR}/include
+  NO_DEFAULT_PATH
+)
+
+FIND_PATH(ILOG_CONCERT_INCLUDE_DIR
+  ilconcert/ilobasic.h
+  HINTS ${ILOG_CONCERT_ROOT_DIR}/include
+  NO_DEFAULT_PATH
+)
+
+FIND_LIBRARY(ILOG_CPLEX_LIBRARY
+  cplex cplex121 cplex122 cplex123 cplex124
+  HINTS ${ILOG_CPLEX_ROOT_DIR}/lib/x86_sles10_4.1/static_pic
+  ${ILOG_CPLEX_ROOT_DIR}/lib/x86-64_sles10_4.1/static_pic
+  ${ILOG_CPLEX_ROOT_DIR}/lib/x86_debian4.0_4.1/static_pic
+  ${ILOG_CPLEX_ROOT_DIR}/lib/x86-64_debian4.0_4.1/static_pic
+  ${ILOG_CPLEX_ROOT_DIR}/lib/${ILOG_WIN_COMPILER}/stat_mda
+  NO_DEFAULT_PATH
+  )
+
+FIND_LIBRARY(ILOG_CONCERT_LIBRARY
+  concert
+  HINTS ${ILOG_CONCERT_ROOT_DIR}/lib/x86_sles10_4.1/static_pic
+  ${ILOG_CONCERT_ROOT_DIR}/lib/x86-64_sles10_4.1/static_pic
+  ${ILOG_CONCERT_ROOT_DIR}/lib/x86_debian4.0_4.1/static_pic
+  ${ILOG_CONCERT_ROOT_DIR}/lib/x86-64_debian4.0_4.1/static_pic
+  ${ILOG_CONCERT_ROOT_DIR}/lib/${ILOG_WIN_COMPILER}/stat_mda
+  NO_DEFAULT_PATH
+  )
+
+FIND_FILE(ILOG_CPLEX_DLL
+  cplex121.dll cplex122.dll cplex123.dll cplex124.dll
+  HINTS ${ILOG_CPLEX_ROOT_DIR}/bin/${ILOG_WIN_PLATFORM}
+  NO_DEFAULT_PATH
+  )
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ILOG
+  DEFAULT_MSG ILOG_CPLEX_LIBRARY ILOG_CPLEX_INCLUDE_DIR
+  )
+
+IF(ILOG_FOUND)
+  SET(ILOG_INCLUDE_DIRS ${ILOG_CPLEX_INCLUDE_DIR} ${ILOG_CONCERT_INCLUDE_DIR})
+  SET(ILOG_LIBRARIES ${ILOG_CPLEX_LIBRARY} ${ILOG_CONCERT_LIBRARY})
+  IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+    # SET(CPLEX_LIBRARIES "${CPLEX_LIBRARIES};m;pthread")
+    SET(ILOG_LIBRARIES ${ILOG_LIBRARIES} "m" "pthread")
+  ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ENDIF(ILOG_FOUND)
+
+MARK_AS_ADVANCED(
+  ILOG_CPLEX_LIBRARY ILOG_CPLEX_INCLUDE_DIR ILOG_CPLEX_DLL
+  ILOG_CONCERT_LIBRARY ILOG_CONCERT_INCLUDE_DIR ILOG_CONCERT_DLL
+  )
Index: lemon/CMakeLists.txt
===================================================================
--- lemon/CMakeLists.txt	(revision 1133)
+++ lemon/CMakeLists.txt	(revision 1230)
@@ -37,5 +37,5 @@
 IF(LEMON_HAVE_CPLEX)
   SET(LEMON_SOURCES ${LEMON_SOURCES} cplex.cc)
-  INCLUDE_DIRECTORIES(${CPLEX_INCLUDE_DIRS})
+  INCLUDE_DIRECTORIES(${ILOG_INCLUDE_DIRS})
 ENDIF()
 
Index: lemon/cbc.h
===================================================================
--- lemon/cbc.h	(revision 956)
+++ lemon/cbc.h	(revision 1232)
@@ -17,5 +17,4 @@
  */
 
-// -*- C++ -*-
 #ifndef LEMON_CBC_H
 #define LEMON_CBC_H
Index: lemon/config.h.in
===================================================================
--- lemon/config.h.in	(revision 1133)
+++ lemon/config.h.in	(revision 1232)
@@ -7,4 +7,6 @@
 #cmakedefine LEMON_HAVE_CLP 1
 #cmakedefine LEMON_HAVE_CBC 1
+#cmakedefine LEMON_DEFAULT_LP @LEMON_DEFAULT_LP@
+#cmakedefine LEMON_DEFAULT_MIP @LEMON_DEFAULT_MIP@
 #cmakedefine LEMON_USE_PTHREAD 1
 #cmakedefine LEMON_USE_WIN32_THREADS 1
Index: lemon/cplex.cc
===================================================================
--- lemon/cplex.cc	(revision 1183)
+++ lemon/cplex.cc	(revision 1231)
@@ -492,4 +492,15 @@
                    _message_enabled ? CPX_ON : CPX_OFF);
   }
+
+  void CplexBase::_write(std::string file, std::string format) const
+  {
+    if(format == "MPS" || format == "LP")
+      CPXwriteprob(cplexEnv(), cplexLp(), file.c_str(), format.c_str());
+    else if(format == "SOL")
+      CPXsolwrite(cplexEnv(), cplexLp(), file.c_str());
+    else throw UnsupportedFormatError(format);
+  }
+
+
 
   // CplexLp members
Index: lemon/cplex.h
===================================================================
--- lemon/cplex.h	(revision 793)
+++ lemon/cplex.h	(revision 1231)
@@ -151,4 +151,6 @@
     bool _message_enabled;
 
+    void _write(std::string file, std::string format) const;
+
   public:
 
@@ -171,4 +173,17 @@
     const cpxlp* cplexLp() const { return _prob; }
 
+#ifdef DOXYGEN
+    /// Write the problem or the solution to a file in the given format
+
+    /// This function writes the problem or the solution
+    /// to a file in the given format.
+    /// Trying to write in an unsupported format will trigger
+    /// \ref UnsupportedFormatError.
+    /// \param file The file path
+    /// \param format The output file format.
+    /// Supportted formats are "MPS", "LP" and "SOL".
+    void write(std::string file, std::string format = "MPS") const {}
+#endif
+
   };
 
Index: lemon/glpk.cc
===================================================================
--- lemon/glpk.cc	(revision 1142)
+++ lemon/glpk.cc	(revision 1231)
@@ -581,4 +581,13 @@
       break;
     }
+  }
+
+  void GlpkBase::_write(std::string file, std::string format) const
+  {
+    if(format == "MPS")
+      glp_write_mps(lp, GLP_MPS_FILE, 0, file.c_str());
+    else if(format == "LP")
+      glp_write_lp(lp, 0, file.c_str());
+    else throw UnsupportedFormatError(format);
   }
 
@@ -999,3 +1008,5 @@
   const char* GlpkMip::_solverName() const { return "GlpkMip"; }
 
+
+
 } //END OF NAMESPACE LEMON
Index: lemon/glpk.h
===================================================================
--- lemon/glpk.h	(revision 956)
+++ lemon/glpk.h	(revision 1231)
@@ -116,4 +116,6 @@
     virtual void _messageLevel(MessageLevel level);
 
+    virtual void _write(std::string file, std::string format) const;
+
   private:
 
@@ -145,4 +147,17 @@
     int lpxCol(Col c) const { return cols(id(c)); }
 
+#ifdef DOXYGEN
+    /// Write the problem or the solution to a file in the given format
+    
+    /// This function writes the problem or the solution
+    /// to a file in the given format.
+    /// Trying to write in an unsupported format will trigger
+    /// \ref UnsupportedFormatError.
+    /// \param file The file path
+    /// \param format The output file format.
+    /// Supportted formats are "MPS" and "LP".
+    void write(std::string file, std::string format = "MPS") const {}
+#endif
+
   };
 
Index: lemon/lp.h
===================================================================
--- lemon/lp.h	(revision 956)
+++ lemon/lp.h	(revision 1232)
@@ -60,5 +60,5 @@
   ///\ingroup lp_group
   ///
-  ///Currently, the possible values are \c GLPK or \c CPLEX
+  ///Currently, the possible values are \c GLPK, \c CPLEX or \c CBC
 #define LEMON_DEFAULT_MIP SOLVER
   ///The default MIP solver.
@@ -67,23 +67,22 @@
   ///\ingroup lp_group
   ///
-  ///Currently, it is either \c GlpkMip or \c CplexMip
+  ///Currently, it is either \c GlpkMip, \c CplexMip , \c CbcMip
   typedef GlpkMip Mip;
 #else
-#ifdef LEMON_HAVE_GLPK
-# define LEMON_DEFAULT_LP GLPK
+#if LEMON_DEFAULT_LP == GLPK
   typedef GlpkLp Lp;
-# define LEMON_DEFAULT_MIP GLPK
-  typedef GlpkMip Mip;
-#elif LEMON_HAVE_CPLEX
-# define LEMON_DEFAULT_LP CPLEX
+#elif LEMON_DEFAULT_LP == CPLEX
   typedef CplexLp Lp;
-# define LEMON_DEFAULT_MIP CPLEX
+#elif LEMON_DEFAULT_LP == SOPLEX
+  typedef SoplexLp Lp;
+#elif LEMON_DEFAULT_LP == CLP
+  typedef ClpLp Lp;
+#endif
+#if LEMON_DEFAULT_MIP == GLPK
+  typedef GlpkLp Mip;
+#elif LEMON_DEFAULT_MIP == CPLEX
   typedef CplexMip Mip;
-#elif LEMON_HAVE_SOPLEX
-# define DEFAULT_LP SOPLEX
-  typedef SoplexLp Lp;
-#elif LEMON_HAVE_CLP
-# define DEFAULT_LP CLP
-  typedef ClpLp Lp;
+#elif LEMON_DEFAULT_MIP == CBC
+  typedef CbcMip Mip;
 #endif
 #endif
Index: lemon/lp_base.h
===================================================================
--- lemon/lp_base.h	(revision 1143)
+++ lemon/lp_base.h	(revision 1231)
@@ -1008,4 +1008,34 @@
   public:
 
+    ///\e
+    class UnsupportedFormatError : public Exception
+    {
+      std::string _format;
+      mutable std::string _what;
+    public:
+      explicit UnsupportedFormatError(std::string format) throw()
+        : _format(format) { }
+      virtual ~UnsupportedFormatError() throw() {}
+      virtual const char* what() const throw() {
+        try {
+          _what.clear();
+          std::ostringstream oss;
+          oss << "lemon::UnsupportedFormatError: " << _format;
+          _what = oss.str();
+        }
+        catch (...) {}
+        if (!_what.empty()) return _what.c_str();
+        else return "lemon::UnsupportedFormatError";
+      }
+    };
+    
+  protected:
+    virtual void _write(std::string, std::string format) const
+    {
+      throw UnsupportedFormatError(format);
+    }
+    
+  public:
+
     /// Virtual destructor
     virtual ~LpBase() {}
@@ -1556,9 +1586,24 @@
     void min() { _setSense(MIN); }
 
-    ///Clears the problem
+    ///Clear the problem
     void clear() { _clear(); rows.clear(); cols.clear(); }
 
-    /// Sets the message level of the solver
+    /// Set the message level of the solver
     void messageLevel(MessageLevel level) { _messageLevel(level); }
+
+    /// Write the problem to a file in the given format
+
+    /// This function writes the problem to a file in the given format.
+    /// Different solver backends may support different formats.
+    /// Trying to write in an unsupported format will trigger
+    /// \ref UnsupportedFormatError. For the supported formats,
+    /// visit the documentation of the base class of the related backends
+    /// (\ref CplexBase, \ref GlpkBase etc.)
+    /// \param file The file path
+    /// \param format The output file format.
+    void write(std::string file, std::string format = "MPS") const
+    {
+      _write(file.c_str(),format.c_str());
+    }
 
     ///@}
Index: lemon/lp_skeleton.cc
===================================================================
--- lemon/lp_skeleton.cc	(revision 956)
+++ lemon/lp_skeleton.cc	(revision 1231)
@@ -92,4 +92,6 @@
   void SkeletonSolverBase::_messageLevel(MessageLevel) {}
 
+  void SkeletonSolverBase::_write(std::string, std::string) const {}
+
   LpSkeleton::SolveExitStatus LpSkeleton::_solve() { return SOLVED; }
 
Index: lemon/lp_skeleton.h
===================================================================
--- lemon/lp_skeleton.h	(revision 956)
+++ lemon/lp_skeleton.h	(revision 1231)
@@ -145,4 +145,8 @@
     ///\e
     virtual void _messageLevel(MessageLevel);
+
+    ///\e
+    virtual void _write(std::string file, std::string format) const;
+
   };
 
@@ -223,4 +227,5 @@
     ///\e
     virtual const char* _solverName() const;
+
   };
 
Index: test/CMakeLists.txt
===================================================================
--- test/CMakeLists.txt	(revision 1228)
+++ test/CMakeLists.txt	(revision 1233)
@@ -70,5 +70,5 @@
   ENDIF()
   IF(LEMON_HAVE_CPLEX)
-    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES})
+    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${ILOG_LIBRARIES})
   ENDIF()
   IF(LEMON_HAVE_CLP)
@@ -94,5 +94,5 @@
     GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
     ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
-      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex.dll ${TARGET_PATH}
+      COMMAND ${CMAKE_COMMAND} -E copy ${ILOG_CPLEX_DLL} ${TARGET_PATH}
     )
   ENDIF()
@@ -112,5 +112,5 @@
   ENDIF()
   IF(LEMON_HAVE_CPLEX)
-    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES})
+    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${ILOG_LIBRARIES})
   ENDIF()
   IF(LEMON_HAVE_CBC)
@@ -136,5 +136,5 @@
     GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
     ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
-      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex.dll ${TARGET_PATH}
+      COMMAND ${CMAKE_COMMAND} -E copy ${ILOG_CPLEX_DLL} ${TARGET_PATH}
     )
   ENDIF()
Index: test/lp_test.cc
===================================================================
--- test/lp_test.cc	(revision 1140)
+++ test/lp_test.cc	(revision 1232)
@@ -241,6 +241,5 @@
   {
     LP::DualExpr e,f,g;
-    LP::Row p1 = INVALID, p2 = INVALID, p3 = INVALID,
-      p4 = INVALID, p5 = INVALID;
+    LP::Row p1 = INVALID, p2 = INVALID;
 
     e[p1]=2;
