Use ctest instead of custom target.

This commit is contained in:
Michael Palimaka 2012-05-16 03:58:34 +10:00
parent 2c2a486313
commit 5bcfecb6cc
2 changed files with 5 additions and 8 deletions

View File

@ -88,7 +88,10 @@ configure_file(taglib/taglib_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib_c
add_subdirectory(taglib)
add_subdirectory(bindings)
add_subdirectory(tests)
if(BUILD_TESTS)
enable_testing()
add_subdirectory(tests)
endif(BUILD_TESTS)
add_subdirectory(examples)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)

View File

@ -1,5 +1,3 @@
if(BUILD_TESTS)
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}/../taglib
${CMAKE_CURRENT_SOURCE_DIR}/../taglib/toolkit
@ -64,8 +62,4 @@ SET(test_runner_SRCS
ADD_EXECUTABLE(test_runner ${test_runner_SRCS})
TARGET_LINK_LIBRARIES(test_runner tag ${CPPUNIT_LIBRARIES})
ADD_CUSTOM_TARGET(check
./test_runner
DEPENDS test_runner
)
endif(BUILD_TESTS)
ADD_TEST(test_runner test_runner)