1 # This is a script for running a Nightly build of kdepim.
2 # It is ready for testing.
3 # To adapt it for other projects, basically only the KDE_CTEST_VCS_REPOSITORY variable
6 # It uses the file KDECTestNightly.cmake, which is in KDE svn in kdesdk/cmake/modules/.
7 # You need to have this file on some location on your system and then point the environment variable
8 # KDECTESTNIGHTLY_DIR to the directory containing this file when running this script.
10 # For more details see the KDELibsNightly.cmake located in KDE/kdelibs/ .
12 # Alex <neundorf AT kde.org>
14 # The VCS of KDE is "svn", also specify the repository
15 set(KDE_CTEST_VCS svn)
16 set(KDE_CTEST_VCS_REPOSITORY https://svn.kde.org/home/kde/trunk/KDE/kdepim)
18 # for now hardcode the generator to "Unix Makefiles"
19 set(CTEST_CMAKE_GENERATOR "Unix Makefiles" )
22 # generic support code, provides the kde_ctest_setup() macro, which sets up everything required:
23 file(TO_CMAKE_PATH $ENV{KDECTESTNIGHTLY_DIR} KDECTESTNIGHTLY_DIR)
24 include( "${KDECTESTNIGHTLY_DIR}/KDECTestNightly.cmake" OPTIONAL RESULT_VARIABLE fileIncluded)
27 message(FATAL_ERROR "Did not find file ${KDECTESTNIGHTLY_DIR}/KDECTestNightly.cmake . Set the environment variable KDECTESTNIGHTLY_DIR to the directory where this file is located. In KDE svn it is in kdesdk/cmake/modules/ ")
28 endif(NOT fileIncluded)
30 # set up binary dir, source dir, etc.
31 kde_ctest_setup("${CMAKE_CURRENT_LIST_FILE}")
33 # now actually do the Nightly
34 ctest_empty_binary_directory("${CTEST_BINARY_DIRECTORY}")
36 ctest_update(SOURCE "${CTEST_SOURCE_DIRECTORY}" )
39 include("${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake")
40 include("${CTEST_SOURCE_DIRECTORY}/CTestCustom.cmake" OPTIONAL)
42 # if CMAKE_INSTALL_PREFIX and BUILD_experimental were defined on the command line, put them
43 # in the initial cache, so cmake gets them
44 kde_ctest_write_initial_cache("${CTEST_BINARY_DIRECTORY}" CMAKE_INSTALL_PREFIX)
46 # configure, build, test, submit
47 ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}" )
48 ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" )
49 ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" )
52 # optionally install afterwards, so additional nightly builds can use this current install
53 # (e.g. kdepimlibs could use this kdelibs install)
55 kde_ctest_install("${CTEST_BINARY_DIRECTORY}" )