]> granicus.if.org Git - taglib/commitdiff
Revert r735160 and r735161, and set BUILD_TESTS to OFF if CppUnit is not found.
authorLukáš Lalinský <lalinsky@gmail.com>
Thu, 22 Nov 2007 13:17:15 +0000 (13:17 +0000)
committerLukáš Lalinský <lalinsky@gmail.com>
Thu, 22 Nov 2007 13:17:15 +0000 (13:17 +0000)
CCMAIL:michael.pyne@kdemail.net

git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@740071 283d02a7-25f6-0310-bc7c-ecb5cbfe19da

ConfigureChecks.cmake
tests/CMakeLists.txt

index 471dba6f9a264d9f7f736d7e18d2d6acba1ec2c4..725a9b50db0117d00691dc8b4fe3a7fe8d42ec96 100644 (file)
@@ -20,6 +20,9 @@ ELSE(ZLIB_FOUND)
        SET(HAVE_ZLIB 0)
 ENDIF(ZLIB_FOUND)
 
-# Currently breaks CMake when CppUnit is not present.
-#SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
-#FIND_PACKAGE(CppUnit)
+SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
+FIND_PACKAGE(CppUnit)
+IF (NOT CPPUNIT_FOUND AND BUILD_TESTS)
+       MESSAGE(STATUS "CppUnit not found, disabling tests.")
+       SET(BUILD_TESTS OFF)
+ENDIF(NOT CPPUNIT_FOUND AND BUILD_TESTS)
index 3da08e66ec28db533bce30de8444fc9deaa4992d..34aa7fab5a32638ee0101985493eb526cb2dd943 100644 (file)
@@ -21,15 +21,12 @@ SET(test_runner_SRCS
   test_id3v2.cpp
 )
 
-# Fails without CppUnit.  These can be uncommented (with an appropriate guard
-# checking for CppUnit availability) after the CppUnit configure check has
-# also been fixed).
-#ADD_EXECUTABLE(test_runner ${test_runner_SRCS})
-#TARGET_LINK_LIBRARIES(test_runner tag ${CPPUNIT_LIBRARIES})
+ADD_EXECUTABLE(test_runner ${test_runner_SRCS})
+TARGET_LINK_LIBRARIES(test_runner tag ${CPPUNIT_LIBRARIES})
 
-#ADD_CUSTOM_TARGET(check
-#    ./test_runner
-#    DEPENDS test_runner
-#)
+ADD_CUSTOM_TARGET(check
+    ./test_runner
+    DEPENDS test_runner
+)
 
 endif(BUILD_TESTS)