COIN-OR::LEMON - Graph Library

Ignore:
Files:
2 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    r668 r599  
    1515INCLUDE(FindGhostscript)
    1616FIND_PACKAGE(GLPK 4.33)
    17 FIND_PACKAGE(CPLEX)
    18 FIND_PACKAGE(COIN)
    1917
    2018ADD_DEFINITIONS(-DHAVE_CONFIG_H)
     
    2826# C4996: 'function': was declared deprecated
    2927ENDIF(MSVC)
     28
     29IF(GLPK_FOUND)
     30  SET(HAVE_LP TRUE)
     31  SET(HAVE_MIP TRUE)
     32  SET(HAVE_GLPK TRUE)
     33ENDIF(GLPK_FOUND)
    3034
    3135INCLUDE(CheckTypeSize)
  • cmake/FindGLPK.cmake

    r666 r496  
    1414
    1515IF(GLPK_FOUND)
    16   SET(GLPK_INCLUDE_DIRS ${GLPK_INCLUDE_DIR})
    1716  SET(GLPK_LIBRARIES ${GLPK_LIBRARY})
    1817  SET(GLPK_BIN_DIR ${GLPK_ROOT_PATH}/bin)
     
    2019
    2120MARK_AS_ADVANCED(GLPK_LIBRARY GLPK_INCLUDE_DIR GLPK_BIN_DIR)
    22 
    23 IF(GLPK_FOUND)
    24   SET(HAVE_LP TRUE)
    25   SET(HAVE_MIP TRUE)
    26   SET(HAVE_GLPK TRUE)
    27 ENDIF(GLPK_FOUND)
  • lemon/CMakeLists.txt

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

    r668 r564  
    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

    r668 r658  
    33  ${PROJECT_BINARY_DIR}
    44)
     5
     6IF(HAVE_GLPK)
     7  INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIR})
     8ENDIF(HAVE_GLPK)
    59
    610LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
     
    3943IF(HAVE_LP)
    4044  ADD_EXECUTABLE(lp_test lp_test.cc)
    41   SET(LP_TEST_LIBS lemon)
    4245  IF(HAVE_GLPK)
    43     SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES})
     46    TARGET_LINK_LIBRARIES(lp_test lemon ${GLPK_LIBRARIES})
    4447  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})
    5248  ADD_TEST(lp_test lp_test)
    5349
     
    6157    )
    6258  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)
    7059ENDIF(HAVE_LP)
    7160
    7261IF(HAVE_MIP)
    7362  ADD_EXECUTABLE(mip_test mip_test.cc)
    74   SET(MIP_TEST_LIBS lemon)
    7563  IF(HAVE_GLPK)
    76     SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES})
     64    TARGET_LINK_LIBRARIES(mip_test lemon ${GLPK_LIBRARIES})
    7765  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})
    8566  ADD_TEST(mip_test mip_test)
    8667
     
    9475    )
    9576  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)
    10377ENDIF(HAVE_MIP)
    10478
Note: See TracChangeset for help on using the changeset viewer.