test/CMakeLists.txt
author Alpar Juttner <alpar@cs.elte.hu>
Fri, 13 Feb 2009 15:01:09 +0000
changeset 558 06787db0ef5f
parent 498 f59df77f5c8d
child 559 9b9ffe7d9b75
permissions -rw-r--r--
Change LEMON's isnan() to isNaN() for the sake of AIX/xlC

Certain xlC versions implement isnan() as a #define.
ladanyi@496
     1
INCLUDE_DIRECTORIES(
ladanyi@496
     2
  ${CMAKE_SOURCE_DIR}
ladanyi@496
     3
  ${CMAKE_BINARY_DIR}
ladanyi@496
     4
)
ladanyi@141
     5
ladanyi@498
     6
IF(HAVE_GLPK)
ladanyi@498
     7
  INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIR})
ladanyi@498
     8
ENDIF(HAVE_GLPK)
ladanyi@498
     9
alpar@225
    10
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon)
ladanyi@141
    11
alpar@225
    12
SET(TESTS
alpar@554
    13
#   adaptors_test
ladanyi@141
    14
  bfs_test
alpar@443
    15
  circulation_test
ladanyi@141
    16
  counter_test
ladanyi@141
    17
  dfs_test
ladanyi@141
    18
  digraph_test
kpeter@170
    19
  dijkstra_test
ladanyi@141
    20
  dim_test
alpar@554
    21
#   edge_set_test
ladanyi@141
    22
  error_test
deba@200
    23
  graph_copy_test
ladanyi@141
    24
  graph_test
kpeter@171
    25
  graph_utils_test
deba@426
    26
  hao_orlin_test
deba@203
    27
  heap_test
ladanyi@141
    28
  kruskal_test
ladanyi@141
    29
  maps_test
deba@338
    30
  max_matching_test
alpar@443
    31
  path_test
alpar@443
    32
  preflow_test
ladanyi@496
    33
  radix_sort_test
alpar@225
    34
  random_test
alpar@443
    35
  suurballe_test
ladanyi@141
    36
  time_measure_test
ladanyi@141
    37
  unionfind_test)
ladanyi@141
    38
ladanyi@496
    39
IF(HAVE_LP)
ladanyi@496
    40
  ADD_EXECUTABLE(lp_test lp_test.cc)
ladanyi@498
    41
  IF(HAVE_GLPK)
ladanyi@498
    42
    TARGET_LINK_LIBRARIES(lp_test lemon ${GLPK_LIBRARIES})
ladanyi@498
    43
  ENDIF(HAVE_GLPK)
ladanyi@496
    44
  ADD_TEST(lp_test lp_test)
ladanyi@496
    45
ladanyi@498
    46
  IF(WIN32 AND HAVE_GLPK)
ladanyi@496
    47
    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
ladanyi@496
    48
    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
ladanyi@496
    49
    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
ladanyi@496
    50
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
ladanyi@496
    51
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
ladanyi@496
    52
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
ladanyi@496
    53
    )
ladanyi@498
    54
  ENDIF(WIN32 AND HAVE_GLPK)
ladanyi@496
    55
ENDIF(HAVE_LP)
ladanyi@496
    56
ladanyi@496
    57
IF(HAVE_MIP)
ladanyi@496
    58
  ADD_EXECUTABLE(mip_test mip_test.cc)
ladanyi@498
    59
  IF(HAVE_GLPK)
ladanyi@498
    60
    TARGET_LINK_LIBRARIES(mip_test lemon ${GLPK_LIBRARIES})
ladanyi@498
    61
  ENDIF(HAVE_GLPK)
ladanyi@496
    62
  ADD_TEST(mip_test mip_test)
ladanyi@496
    63
ladanyi@498
    64
  IF(WIN32 AND HAVE_GLPK)
ladanyi@496
    65
    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
ladanyi@496
    66
    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
ladanyi@496
    67
    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
ladanyi@496
    68
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
ladanyi@496
    69
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
ladanyi@496
    70
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
ladanyi@496
    71
    )
ladanyi@498
    72
  ENDIF(WIN32 AND HAVE_GLPK)
ladanyi@496
    73
ENDIF(HAVE_MIP)
ladanyi@496
    74
alpar@225
    75
FOREACH(TEST_NAME ${TESTS})
alpar@225
    76
  ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
alpar@225
    77
  TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
alpar@225
    78
  ADD_TEST(${TEST_NAME} ${TEST_NAME})
alpar@225
    79
ENDFOREACH(TEST_NAME)