ENH: Add test_clean target to wipe out tests

We frequently need to wipe out all the CMake test build directories in
order to run tests from scratch.  This change adds a test_clean custom
target to remove all these directories for out-of-source builds.
This commit is contained in:
Brad King 2008-08-19 11:43:57 -04:00
parent fe98e57e38
commit 181c1eeede
2 changed files with 60 additions and 0 deletions

View File

@ -10,10 +10,14 @@ MACRO(ADD_TEST_MACRO NAME COMMAND)
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-project ${NAME}
--test-command ${COMMAND})
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${NAME}")
ENDMACRO(ADD_TEST_MACRO)
# Testing
IF(BUILD_TESTING)
# Collect a list of all test build directories.
SET(TEST_BUILD_DIRS)
# Should the long tests be run?
OPTION(CMAKE_RUN_LONG_TESTS
"Should the long tests be run (such as Bootstrap)." ON)
@ -110,6 +114,7 @@ IF(BUILD_TESTING)
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-project Simple
--test-command Simple)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Simple_EclipseGenerator")
ENDIF ("${cmakeOutput}" MATCHES Eclipse)
# check for the CodeBlocks generator
@ -123,6 +128,7 @@ IF(BUILD_TESTING)
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-project Simple
--test-command Simple)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Simple_CodeBlocksGenerator")
ENDIF ("${cmakeOutput}" MATCHES CodeBlocks)
# check for the KDevelop3 generator
@ -136,6 +142,7 @@ IF(BUILD_TESTING)
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-project Simple
--test-command Simple)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Simple_KDevelop3Generator")
ENDIF ("${cmakeOutput}" MATCHES KDevelop3)
ENDIF(${CMAKE_TEST_GENERATOR} MATCHES "Unix Makefiles" OR ${CMAKE_TEST_GENERATOR} MATCHES "KDevelop")
@ -172,6 +179,7 @@ IF(BUILD_TESTING)
--test-command foo
)
SET_TESTS_PROPERTIES ( SubProject-Stage2 PROPERTIES DEPENDS SubProject)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/SubProject")
ENDIF(NOT MSVC60 AND NOT XCODE AND NOT MSVC70)
IF (CMAKE_STRICT)
@ -203,6 +211,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-options
"-DCMAKE_INSTALL_PREFIX:PATH=${CMake_BINARY_DIR}/Tests/Framework/Install"
--test-command bar)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Framework")
ADD_TEST(TargetName ${CMAKE_CTEST_COMMAND}
--build-and-test
@ -215,6 +224,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--test-command ${CMAKE_CMAKE_COMMAND} -E compare_files
${CMake_SOURCE_DIR}/Tests/TargetName/scripts/hello_world
${CMake_BINARY_DIR}/Tests/TargetName/scripts/hello_world)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/TargetName")
ADD_TEST(LibName ${CMAKE_CTEST_COMMAND}
--build-and-test
@ -227,6 +237,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-exe-dir "${CMake_BINARY_DIR}/Tests/LibName/lib"
--test-command foobar
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/LibName")
ADD_TEST(CustComDepend ${CMAKE_CTEST_COMMAND}
--build-and-test
@ -239,6 +250,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-exe-dir "${CMake_BINARY_DIR}/Tests/CustComDepend/bin"
--test-command foo bar.c
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/CustComDepend")
ADD_TEST(CustomCommand ${CMAKE_CTEST_COMMAND}
--build-and-test
@ -251,6 +263,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-exe-dir "${CMake_BINARY_DIR}/Tests/CustomCommand/bin"
--test-command CustomCommand
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/CustomCommand")
ADD_TEST(CustomCommandWorkingDirectory ${CMAKE_CTEST_COMMAND}
--build-and-test
@ -262,6 +275,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--test-command working
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/CustomCommandWorkingDirectory")
#ADD_TEST(SimpleExclude ${CMAKE_CTEST_COMMAND}
# --build-and-test
@ -298,6 +312,9 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-two-config
--test-command
"${CMake_BINARY_DIR}/Tests/OutOfSource/SubDir/OutOfSourceSubdir/simple")
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/OutOfSource")
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/OutOfSourceDeep")
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/OutOfBinary")
ADD_TEST(BuildDepends ${CMAKE_CTEST_COMMAND}
--build-and-test
@ -307,6 +324,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-project BuildDepends
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BuildDepends")
SET(SimpleInstallInstallDir
"${CMake_BINARY_DIR}/Tests/SimpleInstall/InstallDirectory")
@ -321,6 +339,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-options
"-DCMAKE_INSTALL_PREFIX:PATH=${SimpleInstallInstallDir}"
--test-command ${SimpleInstallInstallDir}/MyTest/bin/SimpleInstExe)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/SimpleInstall")
ADD_TEST(SimpleInstall-Stage2 ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/SimpleInstallS2"
@ -333,6 +352,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
"-DCMAKE_INSTALL_PREFIX:PATH=${SimpleInstallInstallDir}"
"-DSTAGE2:BOOL=1"
--test-command ${SimpleInstallInstallDir}/MyTest/bin/SimpleInstExeS2)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/SimpleInstallS2")
# By default, run the CPackComponents test if the CTEST_TEST_CPACK
# option is ON:
@ -367,6 +387,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--test-command ${CMAKE_CMAKE_COMMAND}
"-DCPackComponents_BINARY_DIR:PATH=${CMake_BINARY_DIR}/Tests/CPackComponents"
-P "${CMake_SOURCE_DIR}/Tests/CPackComponents/VerifyResult.cmake")
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/CPackComponents")
ENDIF(CTEST_RUN_CPackComponents)
ADD_TEST(X11 ${CMAKE_CTEST_COMMAND}
@ -378,6 +399,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-two-config
--test-command UseX11)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/X11")
ADD_TEST(LoadedCommandOneConfig ${CMAKE_CTEST_COMMAND}
--build-and-test
@ -388,6 +410,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--test-command LoadedCommand
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/LoadCommandOneConfig")
# Como does not seem to support shared libraries.
GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
@ -410,6 +433,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
-DCMAKE_TEST_SYSTEM_LIBRARIES:BOOL=${CMAKE_TEST_SYSTEM_LIBRARIES}
--test-command complex
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Complex")
ADD_TEST(complexOneConfig ${CMAKE_CTEST_COMMAND}
--build-and-test
@ -423,6 +447,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
-DCMAKE_TEST_DIFFERENT_GENERATOR:BOOL=${CMAKE_TEST_DIFFERENT_GENERATOR}
-DCMAKE_TEST_SYSTEM_LIBRARIES:BOOL=${CMAKE_TEST_SYSTEM_LIBRARIES}
--test-command complex)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/ComplexOneConfig")
# This fails on VS 70
# works on Xcode and makefiles
@ -460,6 +485,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-exe-dir "${CMake_BINARY_DIR}/Example/Demo"
--test-command helloDemo
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Example")
# do each of the tutorial steps
FOREACH(STP RANGE 1 7)
@ -473,6 +499,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-project Tutorial
--test-command Tutorial 25.0)
ENDFOREACH(STP)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Tutorial")
ADD_TEST(testing ${CMAKE_CTEST_COMMAND}
--build-and-test
@ -484,6 +511,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-exe-dir "${CMake_BINARY_DIR}/Tests/Testing/bin"
--test-command testing
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Testing")
ADD_TEST(wrapping ${CMAKE_CTEST_COMMAND}
--build-and-test
@ -505,6 +533,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-exe-dir "${CMake_BINARY_DIR}/Tests/Wrapping/bin"
--test-command qtwrapping
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Wrapping")
ADD_TEST(testdriver1 ${CMAKE_CTEST_COMMAND}
--build-and-test
@ -538,6 +567,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-project TestDriverTest
--test-command TestDriverTest subdir/test3
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/TestDriver")
ADD_TEST(Dependency ${CMAKE_CTEST_COMMAND}
--build-and-test
@ -549,6 +579,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-project Dependency
--test-command exec
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Dependency")
IF("${CMAKE_SYSTEM_NAME}" MATCHES syllable)
@ -592,6 +623,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--test-command jumpExecutable
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Jump")
ADD_TEST(Plugin ${CMAKE_CTEST_COMMAND}
--build-and-test
@ -602,6 +634,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-two-config
--test-command bin/example)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Plugin")
IF(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG)
ADD_TEST_MACRO(RuntimePath RuntimePath)
@ -627,6 +660,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-project LinkLineOrder
--test-command Exec2
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/LinkLineOrder")
SET_TESTS_PROPERTIES ( qtwrapping PROPERTIES DEPENDS wrapping)
SET_TESTS_PROPERTIES ( testdriver1 PROPERTIES DEPENDS qtwrapping)
SET_TESTS_PROPERTIES ( testdriver2 PROPERTIES DEPENDS testdriver1)
@ -644,6 +678,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-project kwsys
--test-command kwsysTestsCxx testIOS
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/kwsys")
ENDIF(NOT CMAKE_TEST_DIFFERENT_GENERATOR)
SET(MAKE_IS_GNU )
IF(${CMAKE_TEST_MAKEPROGRAM} MATCHES make)
@ -676,6 +711,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
"${CMake_BINARY_DIR}/Tests/SubDirSpaces/ShouldBeHere"
"${CMake_BINARY_DIR}/Tests/SubDirSpaces/testfromsubdir.obj"
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/SubDirSpaces")
ENDIF (MAKE_IS_GNU OR
"${CMAKE_TEST_MAKEPROGRAM}" MATCHES "nmake|gmake|wmake" OR
"${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio|XCode|Borland")
@ -707,6 +743,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
"${CMake_BINARY_DIR}/Tests/SubDir/testfromsubdir.o"
)
ENDIF (WIN32)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/SubDir")
IF(CMAKE_TEST_MSVC)
ADD_TEST_MACRO(PrecompiledHeader foo)
@ -723,6 +760,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-exe-dir "${CMake_BINARY_DIR}/MakeClean"
--test-command check_clean
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/MakeClean")
ENDIF("${CMAKE_TEST_GENERATOR}" MATCHES "Makefile")
IF(${CMAKE_TEST_GENERATOR} MATCHES "Visual Studio")
@ -735,6 +773,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-project VSExternalInclude
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--test-command VSExternalInclude)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/VSExternalInclude")
ENDIF(${CMAKE_TEST_GENERATOR} MATCHES "Visual Studio")
IF (APPLE AND CMAKE_COMPILER_IS_GNUCXX)
@ -754,6 +793,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
"-DCMake_SOURCE_DIR:PATH=${CMAKE_SOURCE_DIR}"
--test-command
${BundleTestInstallDir}/Applications/SecondBundleExe.app/Contents/MacOS/SecondBundleExe)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BundleTest")
ADD_TEST_MACRO(ObjC++ ObjC++)
ENDIF (APPLE AND CMAKE_COMPILER_IS_GNUCXX)
@ -770,6 +810,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-target package
--build-options "-DCMAKE_INSTALL_PREFIX:PATH=${CMake_BINARY_DIR}/Tests/BundleGeneratorTest/InstallDirectory"
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BundleGeneratorTest")
ENDIF(APPLE AND CTEST_TEST_CPACK)
IF (CTEST_TEST_CTEST AND CMAKE_RUN_LONG_TESTS)
@ -832,6 +873,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-generator "${CMAKE_TEST_GENERATOR}"
--test-command
${CMake_BINARY_DIR}/Tests/BootstrapTest/Bootstrap.cmk/cmake)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/BootstrapTest")
# provide more time for the bootstrap test
GET_TEST_PROPERTY(BootstrapTest TIMEOUT PREVIOUS_TIMEOUT)
@ -863,6 +905,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-two-config
--test-command testf)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Fortran")
ENDIF(CMAKE_Fortran_COMPILER_FULLPATH)
ENDIF(CMAKE_TEST_GENERATOR MATCHES "Makefiles"
OR CMAKE_TEST_GENERATOR MATCHES "KDevelop")
@ -887,6 +930,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-two-config
--build-run-dir "${CMake_BINARY_DIR}/Tests/Java/"
--test-command ${JAVA_RUNTIME} -classpath hello.jar HelloWorld)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Java")
ENDIF("${JNI_FILE}" MATCHES "JDK1_2")
ENDIF(JNI_H)
ENDIF(JAVA_COMPILE AND JAVA_RUNTIME AND JAVA_ARCHIVE AND NOT MINGW)
@ -909,6 +953,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-options
"-DCMAKE_SYSTEM_NAME=Generic"
"-DCMAKE_C_COMPILER=${SDCC_EXECUTABLE}")
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/SimpleCOnly_sdcc")
ENDIF(SDCC_EXECUTABLE)
@ -927,6 +972,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
"-DCMAKE_SYSTEM_NAME=Windows"
"-DCMAKE_C_COMPILER=${MINGW_CC_LINUX2WIN_EXECUTABLE}"
"-DCMAKE_CXX_COMPILER=${MINGW_CXX_LINUX2WIN_EXECUTABLE}")
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Simple_Mingw_Linux2Win")
ENDIF(MINGW_CC_LINUX2WIN_EXECUTABLE AND MINGW_CXX_LINUX2WIN_EXECUTABLE)
@ -945,6 +991,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-options -DwxWidgets_CONFIG_EXECUTABLE=${wxWidgets_CONFIG_EXECUTABLE}
--test-command UseWX
)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/UseWX")
ENDIF(BUILD_WXDialog AND wxWidgets_CONFIG_EXECUTABLE)
IF(UNIX)
@ -975,6 +1022,17 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
SET_TESTS_PROPERTIES ( KDELibsAlpha1 PROPERTIES TIMEOUT 5400)
ENDIF(CMAKE_TEST_KDELIBS_ALPHA_1_DIR)
# If this is not an in-source build, provide a target to wipe out
# all the test build directories.
IF(NOT EXISTS "${CMAKE_BINARY_DIR}/CMakeLists.txt")
CONFIGURE_FILE(${CMake_SOURCE_DIR}/Tests/test_clean.cmake.in
${CMake_BINARY_DIR}/Tests/test_clean.cmake @ONLY)
ADD_CUSTOM_TARGET(test_clean
COMMAND ${CMAKE_COMMAND} -P ${CMake_BINARY_DIR}/Tests/test_clean.cmake
COMMENT "Removing test build directories."
)
ENDIF(NOT EXISTS "${CMAKE_BINARY_DIR}/CMakeLists.txt")
ENDIF(BUILD_TESTING)
SUBDIRS(CMakeTests)

View File

@ -0,0 +1,2 @@
SET(TEST_BUILD_DIRS "@TEST_BUILD_DIRS@")
FILE(REMOVE_RECURSE ${TEST_BUILD_DIRS})