set (TESTINGDIRS utils indextesters streamanalyzer daemon)
subdirs (${TESTINGDIRS})

# setting for using CPPUNIT

include_directories (. ${CPPUNIT_INCLUDE_DIR}  ${strigi_SOURCE_DIR}/src/daemon
    ${strigi_BINARY_DIR}/src/streams)

# a convenience library that adds a unified way of build a test executable
# for testing
# simply link this into any unit test executable
add_library(test_runner test_runner.cpp)
target_link_libraries(test_runner ${CPPUNIT_LIBRARIES})

ENABLE_TESTING()


# Not all systems have mkdtemp, and some of the tests use mkdtemp
# -- pulling in an implementation from kdefakes is an annoying workaround,
# so instead just don't do the tests here.
CHECK_FUNCTION_EXISTS(mkdtemp HAVE_MKDTEMP)

set (TESTINGDIRS utils indextesters streamanalyzer daemon)
IF(NOT HAVE_MKDTEMP)
    MESSAGE(WARNING " No mkdtemp found; some Strigi tests are suppressed.")
    SET(TESTINGDIRS utils daemon)
ENDIF(NOT HAVE_MKDTEMP)

subdirs (${TESTINGDIRS})

# setting for using CPPUNIT

include_directories (. ${CPPUNIT_INCLUDE_DIR}  ${strigi_SOURCE_DIR}/src/daemon
    ${strigi_BINARY_DIR}/src/streams)

# a convenience library that adds a unified way of build a test executable
# for testing
# simply link this into any unit test executable
add_library(test_runner test_runner.cpp)
target_link_libraries(test_runner ${CPPUNIT_LIBRARIES})

ENABLE_TESTING()


Handle systems with no mkdtemp -- they shouldn't try building some (most) of the strigi tests.
Handle systems with no mkdtemp -- they shouldn't try building some (most) of the strigi tests.

svn path=/trunk/kdesupport/strigi/; revision=828858
