LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
min_cost_arborescence_test
ADD_EXECUTABLE(lp_test lp_test.cc)
SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES})
SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES})
SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES})
TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS})
ADD_TEST(lp_test lp_test)
GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
ENDIF(WIN32 AND HAVE_GLPK)
GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
ENDIF(WIN32 AND HAVE_CPLEX)
ADD_EXECUTABLE(mip_test mip_test.cc)
SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES})
SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES})
SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES})
TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS})
ADD_TEST(mip_test mip_test)
GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
ENDIF(WIN32 AND HAVE_GLPK)
GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
ENDIF(WIN32 AND HAVE_CPLEX)
FOREACH(TEST_NAME ${TESTS})
ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
ADD_TEST(${TEST_NAME} ${TEST_NAME})