6 LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
30 min_cost_arborescence_test
41 ADD_EXECUTABLE(lp_test lp_test.cc)
42 SET(LP_TEST_LIBS lemon)
44 SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES})
45 ENDIF(LEMON_HAVE_GLPK)
47 SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES})
48 ENDIF(LEMON_HAVE_CPLEX)
50 SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES})
52 TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS})
53 ADD_TEST(lp_test lp_test)
55 IF(WIN32 AND LEMON_HAVE_GLPK)
56 GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
57 GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
58 ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
59 COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
60 COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
61 COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
63 ENDIF(WIN32 AND LEMON_HAVE_GLPK)
64 IF(WIN32 AND LEMON_HAVE_CPLEX)
65 GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
66 GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
67 ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
68 COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
70 ENDIF(WIN32 AND LEMON_HAVE_CPLEX)
74 ADD_EXECUTABLE(mip_test mip_test.cc)
75 SET(MIP_TEST_LIBS lemon)
77 SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES})
78 ENDIF(LEMON_HAVE_GLPK)
80 SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES})
81 ENDIF(LEMON_HAVE_CPLEX)
83 SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES})
85 TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS})
86 ADD_TEST(mip_test mip_test)
88 IF(WIN32 AND LEMON_HAVE_GLPK)
89 GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
90 GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
91 ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
92 COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
93 COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
94 COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
96 ENDIF(WIN32 AND LEMON_HAVE_GLPK)
97 IF(WIN32 AND LEMON_HAVE_CPLEX)
98 GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
99 GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
100 ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
101 COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
103 ENDIF(WIN32 AND LEMON_HAVE_CPLEX)
104 ENDIF(LEMON_HAVE_MIP)
106 FOREACH(TEST_NAME ${TESTS})
107 ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
108 TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
109 ADD_TEST(${TEST_NAME} ${TEST_NAME})
110 ENDFOREACH(TEST_NAME)