COIN-OR::LEMON - Graph Library

Ticket #460: soplex.patch

File soplex.patch, 2.4 KB (added by Alpar Juttner, 6 years ago)
  • CMakeLists.txt

    # HG changeset patch
    # User John Doe <john@example.com>
    # Date 1364478763 -3600
    # Node ID 1dc418bde13d8d6e94fcdf5bf4cee58611f1624b
    # Parent  473c71baff72fa87fce601589e9ac07e88c3e98d
    Added cmake support to find SoPlex
    
    diff -r 473c71baff72 -r 1dc418bde13d CMakeLists.txt
    a b  
    6464FIND_PACKAGE(GLPK 4.33)
    6565FIND_PACKAGE(CPLEX)
    6666FIND_PACKAGE(COIN)
     67FIND_PACKAGE(SOPLEX)
    6768
    6869IF(DEFINED ENV{LEMON_CXX_WARNING})
    6970  SET(CXX_WARNING $ENV{LEMON_CXX_WARNING})
  • new file cmake/FindSOPLEX.cmake

    diff -r 473c71baff72 -r 1dc418bde13d cmake/FindSOPLEX.cmake
    - +  
     1SET(SOPLEX_ROOT_DIR "" CACHE PATH "SoPlex root directory")
     2
     3FIND_PATH(SOPLEX_INCLUDE_DIR
     4  soplex.h
     5  HINTS ${SOPLEX_ROOT_DIR}/src
     6)
     7FIND_LIBRARY(SOPLEX_LIBRARY
     8  soplex
     9  HINTS ${SOPLEX_ROOT_DIR}/lib
     10)
     11
     12INCLUDE(FindPackageHandleStandardArgs)
     13FIND_PACKAGE_HANDLE_STANDARD_ARGS(SOPLEX DEFAULT_MSG SOPLEX_LIBRARY SOPLEX_INCLUDE_DIR)
     14
     15IF(SOPLEX_FOUND)
     16  SET(SOPLEX_INCLUDE_DIRS ${SOPLEX_INCLUDE_DIR})
     17  SET(SOPLEX_LIBRARIES ${SOPLEX_LIBRARY})
     18  IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
     19    SET(SOPLEX_LIBRARIES "${SOPLEX_LIBRARIES};z")
     20  ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
     21ENDIF(SOPLEX_FOUND)
     22
     23MARK_AS_ADVANCED(SOPLEX_LIBRARY SOPLEX_INCLUDE_DIR)
     24
     25IF(SOPLEX_FOUND)
     26  SET(LEMON_HAVE_LP TRUE)
     27  SET(LEMON_HAVE_SOPLEX TRUE)
     28ENDIF(SOPLEX_FOUND)
  • lemon/CMakeLists.txt

    diff -r 473c71baff72 -r 1dc418bde13d lemon/CMakeLists.txt
    a b  
    4949  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
    5050ENDIF()
    5151
     52IF(LEMON_HAVE_SOPLEX)
     53  SET(LEMON_SOURCES ${LEMON_SOURCES} soplex.cc)
     54  INCLUDE_DIRECTORIES(${SOPLEX_INCLUDE_DIRS})
     55ENDIF()
     56
    5257ADD_LIBRARY(lemon ${LEMON_SOURCES})
    5358IF(UNIX)
    5459  SET_TARGET_PROPERTIES(lemon PROPERTIES OUTPUT_NAME emon)
  • lemon/config.h.in

    diff -r 473c71baff72 -r 1dc418bde13d lemon/config.h.in
    a b  
    44#cmakedefine LEMON_HAVE_MIP 1
    55#cmakedefine LEMON_HAVE_GLPK 1
    66#cmakedefine LEMON_HAVE_CPLEX 1
     7#cmakedefine LEMON_HAVE_SOPLEX 1
    78#cmakedefine LEMON_HAVE_CLP 1
    89#cmakedefine LEMON_HAVE_CBC 1
    910#cmakedefine LEMON_USE_PTHREAD 1