]> granicus.if.org Git - taglib/commitdiff
Use ctest instead of custom target.
authorMichael Palimaka <kensington@gentoo.org>
Tue, 15 May 2012 17:58:34 +0000 (03:58 +1000)
committerMichael Palimaka <kensington@gentoo.org>
Tue, 15 May 2012 18:00:22 +0000 (04:00 +1000)
CMakeLists.txt
tests/CMakeLists.txt

index e00f04d31cc05e66c39fe01864527c1e3a248cb1..4692ebb228e0a16111ba77bb0febe26fc7cd9058 100644 (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)
index 67b295814274fb2fd5de00b344db0dfb52122ee3..79d19429157c7b37d83470c853fdc864dc1026fc 100644 (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)