Update master to aliroot
[u/mrichter/AliRoot.git] / AliRoot_test.cmake
... / ...
CommitLineData
1 ################################################################################
2 # Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
3 # #
4 # This software is distributed under the terms of the #
5 # GNU Lesser General Public Licence version 3 (LGPL) version 3, #
6 # copied verbatim in the file "LICENSE" #
7 ################################################################################
8SET (CTEST_SOURCE_DIRECTORY $ENV{SOURCEDIR})
9SET (CTEST_BINARY_DIRECTORY $ENV{BUILDDIR})
10SET (CTEST_ROOTSYS_DIRECTORY $ENV{ROOTSYS})
11SET (CTEST_SITE $ENV{SITE})
12SET (CTEST_BUILD_NAME $ENV{LABEL})
13SET (CTEST_CMAKE_GENERATOR "Unix Makefiles")
14SET (CTEST_PROJECT_NAME "ALIROOT")
15
16Find_program(CTEST_GIT_COMMAND NAMES git)
17Set(CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")
18
19#If($ENV{ctest_model} MATCHES Continuous)
20# Set(CTEST_SVN_UPDATE_OPTIONS "$ENV{REVISION}")
21#EndIf($ENV{ctest_model} MATCHES Continuous)
22
23
24Set (CTEST_CONFIGURE_COMMAND " \"${CMAKE_EXECUTABLE_NAME}\" \"-DROOTSYS=${CTEST_ROOTSYS_DIRECTORY}\" \"${CTEST_SOURCE_DIRECTORY}\" ")
25
26SET (BUILD_COMMAND "make")
27SET (CTEST_BUILD_COMMAND "${BUILD_COMMAND} -j$ENV{number_of_processors}")
28
29If($ENV{ctest_model} MATCHES Nightly)
30
31 Set (CTEST_CONFIGURE_COMMAND " \"${CMAKE_EXECUTABLE_NAME}\" \"-DCMAKE_BUILD_TYPE=NIGHTLY\" \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\" \"-DROOTSYS=${CTEST_ROOTSYS_DIRECTORY}\" ")
32 CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
33
34endif($ENV{ctest_model} MATCHES Nightly)
35
36
37configure_file(${CTEST_SOURCE_DIRECTORY}/CTestCustom.cmake
38 ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake
39 )
40ctest_read_custom_files("${CTEST_BINARY_DIRECTORY}")
41
42CTEST_START ($ENV{ctest_model})
43CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}")
44CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}")
45CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}")
46CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL $ENV{number_of_processors})
47CTEST_SUBMIT ()
48