COIN-OR::LEMON - Graph Library

Ticket #388: e20fecd1945f_cmake_make_check.patch

File e20fecd1945f_cmake_make_check.patch, 935 bytes (added by Akos Ladanyi, 14 years ago)
  • CMakeLists.txt

    # HG changeset patch
    # User Akos Ladanyi <ladanyi@tmit.bme.hu>
    # Date 1282764898 -7200
    # Node ID e20fecd1945f0d5ac2a82b79a0e7d794de4e6cd9
    # Parent  24b3f18ed9e2bea99ab482c493c3db769362ecf0
    Add check target for CMake (#388)
    
    diff --git a/CMakeLists.txt b/CMakeLists.txt
    a b  
    3939
    4040ENABLE_TESTING()
    4141
     42ADD_CUSTOM_TARGET(check COMMAND ${CMAKE_CTEST_COMMAND})
     43
    4244ADD_SUBDIRECTORY(lemon)
    4345IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
    4446  ADD_SUBDIRECTORY(demo)
  • test/CMakeLists.txt

    diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
    a b  
    117117ENDIF()
    118118
    119119FOREACH(TEST_NAME ${TESTS})
    120   ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
     120  ADD_EXECUTABLE(${TEST_NAME} EXCLUDE_FROM_ALL ${TEST_NAME}.cc)
    121121  TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
    122122  ADD_TEST(${TEST_NAME} ${TEST_NAME})
     123  ADD_DEPENDENCIES(check ${TEST_NAME})
    123124ENDFOREACH()