COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/CMakeLists.txt

    r658 r668  
    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.