... | ... |
@@ -44,89 +44,91 @@ |
44 | 44 |
unionfind_test |
45 | 45 |
) |
46 | 46 |
|
47 | 47 |
IF(LEMON_HAVE_LP) |
48 | 48 |
IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer") |
49 | 49 |
ADD_EXECUTABLE(lp_test lp_test.cc) |
50 | 50 |
ELSE() |
51 | 51 |
ADD_EXECUTABLE(lp_test EXCLUDE_FROM_ALL lp_test.cc) |
52 | 52 |
ENDIF() |
53 | 53 |
|
54 | 54 |
SET(LP_TEST_LIBS lemon) |
55 | 55 |
|
56 | 56 |
IF(LEMON_HAVE_GLPK) |
57 | 57 |
SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES}) |
58 | 58 |
ENDIF() |
59 | 59 |
IF(LEMON_HAVE_CPLEX) |
60 | 60 |
SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES}) |
61 | 61 |
ENDIF() |
62 | 62 |
IF(LEMON_HAVE_CLP) |
63 | 63 |
SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES}) |
64 | 64 |
ENDIF() |
65 | 65 |
|
66 | 66 |
TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS}) |
67 | 67 |
ADD_TEST(lp_test lp_test) |
68 |
ADD_DEPENDENCIES(check lp_test) |
|
68 | 69 |
|
69 | 70 |
IF(WIN32 AND LEMON_HAVE_GLPK) |
70 | 71 |
GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION) |
71 | 72 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
72 | 73 |
ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD |
73 | 74 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH} |
74 | 75 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH} |
75 | 76 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH} |
76 | 77 |
) |
77 | 78 |
ENDIF() |
78 | 79 |
|
79 | 80 |
IF(WIN32 AND LEMON_HAVE_CPLEX) |
80 | 81 |
GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION) |
81 | 82 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
82 | 83 |
ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD |
83 | 84 |
COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH} |
84 | 85 |
) |
85 | 86 |
ENDIF() |
86 | 87 |
ENDIF() |
87 | 88 |
|
88 | 89 |
IF(LEMON_HAVE_MIP) |
89 | 90 |
IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer") |
90 | 91 |
ADD_EXECUTABLE(mip_test mip_test.cc) |
91 | 92 |
ELSE() |
92 | 93 |
ADD_EXECUTABLE(mip_test EXCLUDE_FROM_ALL mip_test.cc) |
93 | 94 |
ENDIF() |
94 | 95 |
|
95 | 96 |
SET(MIP_TEST_LIBS lemon) |
96 | 97 |
|
97 | 98 |
IF(LEMON_HAVE_GLPK) |
98 | 99 |
SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES}) |
99 | 100 |
ENDIF() |
100 | 101 |
IF(LEMON_HAVE_CPLEX) |
101 | 102 |
SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES}) |
102 | 103 |
ENDIF() |
103 | 104 |
IF(LEMON_HAVE_CBC) |
104 | 105 |
SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES}) |
105 | 106 |
ENDIF() |
106 | 107 |
|
107 | 108 |
TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS}) |
108 | 109 |
ADD_TEST(mip_test mip_test) |
110 |
ADD_DEPENDENCIES(check mip_test) |
|
109 | 111 |
|
110 | 112 |
IF(WIN32 AND LEMON_HAVE_GLPK) |
111 | 113 |
GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION) |
112 | 114 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
113 | 115 |
ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD |
114 | 116 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH} |
115 | 117 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH} |
116 | 118 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH} |
117 | 119 |
) |
118 | 120 |
ENDIF() |
119 | 121 |
|
120 | 122 |
IF(WIN32 AND LEMON_HAVE_CPLEX) |
121 | 123 |
GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION) |
122 | 124 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
123 | 125 |
ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD |
124 | 126 |
COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH} |
125 | 127 |
) |
126 | 128 |
ENDIF() |
127 | 129 |
ENDIF() |
128 | 130 |
|
129 | 131 |
FOREACH(TEST_NAME ${TESTS}) |
130 | 132 |
IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer") |
131 | 133 |
ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc) |
132 | 134 |
ELSE() |
0 comments (0 inline)