Location: LEMON/LEMON-official/test/CMakeLists.txt - annotation

Load file history
gravatar
alpar (Alpar Juttner)
Backport the CMAKE related changesets from the main branch [e20fecd1945f] Add check target for CMake (#388) [e74b5db4f2c6] Put the output of chg-len.py in the version string (#389) [7d166b8b8018] Safer call of ./scripts/chg-len.py on Windows (#389) [659ba4805a48] Make CMAKE config more consistent with configure.ac (#390) [63e4468c680e] Add 'Maintainer' CMAKE build type (#388, #390) [a725503acfe9] Allow CPACK configuration on all platforms [10242c611190] Create and install lemon.pc (#393) [48e29534cf03] The deafult target doesn't build lp_test and mip_test (#388) [0fbbdd578c06] Full path for DoxygenLayout.xml in Doxyfile.in (#395) [481496e6d71f] SOURCE_BROWSER Doxygen switch is configurable from CMAKE (#395) [09282720100b] update-external-tags CMAKE target (#395)
 r539:d8ca76573eb3
 r596:ba659d676331
 r539:d8ca76573eb3
 r539:d8ca76573eb3
 r141:96f81c791f0c
 r726:9c7639f3a741
 r726:9c7639f3a741
 r726:9c7639f3a741
 r141:96f81c791f0c
 r225:c5a40fc54f1a
 r559:9b9ffe7d9b75
 r141:96f81c791f0c
 r443:346991bf7ddd
 r696:76cbcb3e9bbb
 r141:96f81c791f0c
 r141:96f81c791f0c
 r141:96f81c791f0c
 r170:91fb4372688f
 r141:96f81c791f0c
 r559:9b9ffe7d9b75
 r141:96f81c791f0c
 r569:22f932bbb305
 r590:924887566bf2
 r200:c0e2c043c060
 r141:96f81c791f0c
 r171:02f4d5d9bfd7
 r426:eac19fb31a09
 r203:215bfc30b14f
 r141:96f81c791f0c
 r141:96f81c791f0c
 r641:d657c71db7db
 r522:7f8560cb9d65
 r648:e8349c6f12ca
 r443:346991bf7ddd
 r443:346991bf7ddd
 r496:17d918051964
 r225:c5a40fc54f1a
 r443:346991bf7ddd
 r141:96f81c791f0c
 r726:9c7639f3a741
 r726:9c7639f3a741
 r141:96f81c791f0c
 r674:20dac2104519
r1033:16d466589b54
r1033:16d466589b54
r1033:16d466589b54
r1033:16d466589b54
r1033:16d466589b54
r1033:16d466589b54
 r667:c3ce597c11ae
 r726:9c7639f3a741
 r674:20dac2104519
 r667:c3ce597c11ae
 r726:9c7639f3a741
 r674:20dac2104519
 r667:c3ce597c11ae
 r726:9c7639f3a741
 r674:20dac2104519
 r668:b536eaacb39b
 r726:9c7639f3a741
 r726:9c7639f3a741
 r667:c3ce597c11ae
 r496:17d918051964
 r496:17d918051964
 r674:20dac2104519
 r496:17d918051964
 r496:17d918051964
 r496:17d918051964
 r726:9c7639f3a741
 r726:9c7639f3a741
 r726:9c7639f3a741
 r496:17d918051964
 r726:9c7639f3a741
 r726:9c7639f3a741
 r674:20dac2104519
 r667:c3ce597c11ae
 r667:c3ce597c11ae
 r667:c3ce597c11ae
 r726:9c7639f3a741
 r667:c3ce597c11ae
 r726:9c7639f3a741
 r726:9c7639f3a741
 r496:17d918051964
 r674:20dac2104519
r1033:16d466589b54
r1033:16d466589b54
r1033:16d466589b54
r1033:16d466589b54
r1033:16d466589b54
r1033:16d466589b54
 r667:c3ce597c11ae
 r726:9c7639f3a741
 r674:20dac2104519
 r667:c3ce597c11ae
 r726:9c7639f3a741
 r674:20dac2104519
 r667:c3ce597c11ae
 r726:9c7639f3a741
 r674:20dac2104519
 r668:b536eaacb39b
 r726:9c7639f3a741
 r726:9c7639f3a741
 r667:c3ce597c11ae
 r496:17d918051964
 r496:17d918051964
 r674:20dac2104519
 r496:17d918051964
 r496:17d918051964
 r496:17d918051964
 r726:9c7639f3a741
 r726:9c7639f3a741
 r726:9c7639f3a741
 r496:17d918051964
 r726:9c7639f3a741
 r726:9c7639f3a741
 r674:20dac2104519
 r667:c3ce597c11ae
 r667:c3ce597c11ae
 r667:c3ce597c11ae
 r726:9c7639f3a741
 r667:c3ce597c11ae
 r726:9c7639f3a741
 r726:9c7639f3a741
 r496:17d918051964
 r225:c5a40fc54f1a
r1033:16d466589b54
r1033:16d466589b54
r1033:16d466589b54
r1033:16d466589b54
r1033:16d466589b54
 r225:c5a40fc54f1a
 r225:c5a40fc54f1a
r1033:16d466589b54
 r726:9c7639f3a741
INCLUDE_DIRECTORIES(
  ${PROJECT_SOURCE_DIR}
  ${PROJECT_BINARY_DIR}
)

LINK_DIRECTORIES(
  ${PROJECT_BINARY_DIR}/lemon
)

SET(TESTS
  adaptors_test
  bfs_test
  circulation_test
  connectivity_test
  counter_test
  dfs_test
  digraph_test
  dijkstra_test
  dim_test
  edge_set_test
  error_test
  euler_test
  gomory_hu_test
  graph_copy_test
  graph_test
  graph_utils_test
  hao_orlin_test
  heap_test
  kruskal_test
  maps_test
  matching_test
  min_cost_arborescence_test
  min_cost_flow_test
  path_test
  preflow_test
  radix_sort_test
  random_test
  suurballe_test
  time_measure_test
  unionfind_test
)

IF(LEMON_HAVE_LP)
  IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
    ADD_EXECUTABLE(lp_test lp_test.cc)
  ELSE()
    ADD_EXECUTABLE(lp_test EXCLUDE_FROM_ALL lp_test.cc)
  ENDIF()

  SET(LP_TEST_LIBS lemon)

  IF(LEMON_HAVE_GLPK)
    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES})
  ENDIF()
  IF(LEMON_HAVE_CPLEX)
    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES})
  ENDIF()
  IF(LEMON_HAVE_CLP)
    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES})
  ENDIF()

  TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS})
  ADD_TEST(lp_test lp_test)

  IF(WIN32 AND LEMON_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_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
    )
  ENDIF()

  IF(WIN32 AND LEMON_HAVE_CPLEX)
    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_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
    )
  ENDIF()
ENDIF()

IF(LEMON_HAVE_MIP)
  IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
    ADD_EXECUTABLE(mip_test mip_test.cc)
  ELSE()
    ADD_EXECUTABLE(mip_test EXCLUDE_FROM_ALL mip_test.cc)
  ENDIF()

  SET(MIP_TEST_LIBS lemon)

  IF(LEMON_HAVE_GLPK)
    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES})
  ENDIF()
  IF(LEMON_HAVE_CPLEX)
    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES})
  ENDIF()
  IF(LEMON_HAVE_CBC)
    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES})
  ENDIF()

  TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS})
  ADD_TEST(mip_test mip_test)

  IF(WIN32 AND LEMON_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_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
    )
  ENDIF()

  IF(WIN32 AND LEMON_HAVE_CPLEX)
    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_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
    )
  ENDIF()
ENDIF()

FOREACH(TEST_NAME ${TESTS})
  IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
    ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
  ELSE()
    ADD_EXECUTABLE(${TEST_NAME} EXCLUDE_FROM_ALL ${TEST_NAME}.cc)
  ENDIF()
  TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
  ADD_TEST(${TEST_NAME} ${TEST_NAME})
  ADD_DEPENDENCIES(check ${TEST_NAME})
ENDFOREACH()