COIN-OR::LEMON - Graph Library

Changes in / [615:7c1324b35d89:616:1f631044c290] in lemon-1.1


Ignore:
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    r541 r613  
    1515INCLUDE(FindGhostscript)
    1616FIND_PACKAGE(GLPK 4.33)
     17FIND_PACKAGE(CPLEX)
     18FIND_PACKAGE(COIN)
    1719
    1820ADD_DEFINITIONS(-DHAVE_CONFIG_H)
     
    2628# C4996: 'function': was declared deprecated
    2729ENDIF(MSVC)
    28 
    29 IF(GLPK_FOUND)
    30   SET(HAVE_LP TRUE)
    31   SET(HAVE_MIP TRUE)
    32   SET(HAVE_GLPK TRUE)
    33 ENDIF(GLPK_FOUND)
    3430
    3531INCLUDE(CheckTypeSize)
  • cmake/FindGLPK.cmake

    r473 r611  
    1414
    1515IF(GLPK_FOUND)
     16  SET(GLPK_INCLUDE_DIRS ${GLPK_INCLUDE_DIR})
    1617  SET(GLPK_LIBRARIES ${GLPK_LIBRARY})
    1718  SET(GLPK_BIN_DIR ${GLPK_ROOT_PATH}/bin)
     
    1920
    2021MARK_AS_ADVANCED(GLPK_LIBRARY GLPK_INCLUDE_DIR GLPK_BIN_DIR)
     22
     23IF(GLPK_FOUND)
     24  SET(HAVE_LP TRUE)
     25  SET(HAVE_MIP TRUE)
     26  SET(HAVE_GLPK TRUE)
     27ENDIF(GLPK_FOUND)
  • lemon/CMakeLists.txt

    r538 r613  
    2121IF(HAVE_GLPK)
    2222  SET(LEMON_SOURCES ${LEMON_SOURCES} glpk.cc)
    23   INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIR})
     23  INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIRS})
    2424  IF(WIN32)
    2525    INSTALL(FILES ${GLPK_BIN_DIR}/glpk.dll DESTINATION bin)
     
    2828  ENDIF(WIN32)
    2929ENDIF(HAVE_GLPK)
     30
     31IF(HAVE_CPLEX)
     32  SET(LEMON_SOURCES ${LEMON_SOURCES} cplex.cc)
     33  INCLUDE_DIRECTORIES(${CPLEX_INCLUDE_DIRS})
     34ENDIF(HAVE_CPLEX)
     35
     36IF(HAVE_CLP)
     37  SET(LEMON_SOURCES ${LEMON_SOURCES} clp.cc)
     38  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
     39ENDIF(HAVE_CLP)
     40
     41IF(HAVE_CBC)
     42  SET(LEMON_SOURCES ${LEMON_SOURCES} cbc.cc)
     43  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
     44ENDIF(HAVE_CBC)
    3045
    3146ADD_LIBRARY(lemon ${LEMON_SOURCES})
  • lemon/config.h.cmake

    r500 r613  
    33#cmakedefine HAVE_MIP 1
    44#cmakedefine HAVE_GLPK 1
     5#cmakedefine HAVE_CPLEX 1
     6#cmakedefine HAVE_CLP 1
     7#cmakedefine HAVE_CBC 1
  • test/CMakeLists.txt

    r603 r613  
    33  ${PROJECT_BINARY_DIR}
    44)
    5 
    6 IF(HAVE_GLPK)
    7   INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIR})
    8 ENDIF(HAVE_GLPK)
    95
    106LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
     
    4339IF(HAVE_LP)
    4440  ADD_EXECUTABLE(lp_test lp_test.cc)
     41  SET(LP_TEST_LIBS lemon)
    4542  IF(HAVE_GLPK)
    46     TARGET_LINK_LIBRARIES(lp_test lemon ${GLPK_LIBRARIES})
     43    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES})
    4744  ENDIF(HAVE_GLPK)
     45  IF(HAVE_CPLEX)
     46    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES})
     47  ENDIF(HAVE_CPLEX)
     48  IF(HAVE_CLP)
     49    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES})
     50  ENDIF(HAVE_CLP)
     51  TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS})
    4852  ADD_TEST(lp_test lp_test)
    4953
     
    5761    )
    5862  ENDIF(WIN32 AND HAVE_GLPK)
     63  IF(WIN32 AND HAVE_CPLEX)
     64    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
     65    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
     66    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
     67      COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
     68    )
     69  ENDIF(WIN32 AND HAVE_CPLEX)
    5970ENDIF(HAVE_LP)
    6071
    6172IF(HAVE_MIP)
    6273  ADD_EXECUTABLE(mip_test mip_test.cc)
     74  SET(MIP_TEST_LIBS lemon)
    6375  IF(HAVE_GLPK)
    64     TARGET_LINK_LIBRARIES(mip_test lemon ${GLPK_LIBRARIES})
     76    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES})
    6577  ENDIF(HAVE_GLPK)
     78  IF(HAVE_CPLEX)
     79    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES})
     80  ENDIF(HAVE_CPLEX)
     81  IF(HAVE_CBC)
     82    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES})
     83  ENDIF(HAVE_CBC)
     84  TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS})
    6685  ADD_TEST(mip_test mip_test)
    6786
     
    7594    )
    7695  ENDIF(WIN32 AND HAVE_GLPK)
     96  IF(WIN32 AND HAVE_CPLEX)
     97    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
     98    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
     99    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
     100      COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
     101    )
     102  ENDIF(WIN32 AND HAVE_CPLEX)
    77103ENDIF(HAVE_MIP)
    78104
Note: See TracChangeset for help on using the changeset viewer.