COIN-OR::LEMON - Graph Library

Changeset 473:17d918051964 in lemon-main for test


Ignore:
Timestamp:
01/20/09 13:23:14 (16 years ago)
Author:
Akos Ladanyi <ladanyi@…>
Branch:
default
Phase:
public
Message:

Build GLPK dependent parts with CMake too

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/CMakeLists.txt

    r469 r473  
    1 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
     1INCLUDE_DIRECTORIES(
     2  ${CMAKE_SOURCE_DIR}
     3  ${CMAKE_BINARY_DIR}
     4  ${GLPK_INCLUDE_DIR}
     5)
    26
    37LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon)
     
    1216  dijkstra_test
    1317  dim_test
     18  edge_set_test
    1419  error_test
    15   edge_set_test
    1620  graph_copy_test
    1721  graph_test
     
    2024  heap_test
    2125  kruskal_test
    22   lp_test
    23   mip_test
    2426  maps_test
    2527  max_matching_test
    26   radix_sort_test
    2728  path_test
    2829  preflow_test
     30  radix_sort_test
    2931  random_test
    3032  suurballe_test
    3133  time_measure_test
    3234  unionfind_test)
     35
     36IF(HAVE_LP)
     37  ADD_EXECUTABLE(lp_test lp_test.cc)
     38  TARGET_LINK_LIBRARIES(lp_test lemon ${GLPK_LIBRARIES})
     39  ADD_TEST(lp_test lp_test)
     40
     41  IF(WIN32)
     42    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
     43    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
     44    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
     45      COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
     46      COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
     47      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
     48    )
     49  ENDIF(WIN32)
     50ENDIF(HAVE_LP)
     51
     52IF(HAVE_MIP)
     53  ADD_EXECUTABLE(mip_test mip_test.cc)
     54  TARGET_LINK_LIBRARIES(mip_test lemon ${GLPK_LIBRARIES})
     55  ADD_TEST(mip_test mip_test)
     56
     57  IF(WIN32)
     58    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
     59    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
     60    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
     61      COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
     62      COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
     63      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
     64    )
     65  ENDIF(WIN32)
     66ENDIF(HAVE_MIP)
    3367
    3468FOREACH(TEST_NAME ${TESTS})
Note: See TracChangeset for help on using the changeset viewer.