]>
Commit | Line | Data |
---|---|---|
ac23a950 | 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 | ################################################################################ | |
8 | SET (CTEST_SOURCE_DIRECTORY $ENV{SOURCEDIR}) | |
9 | SET (CTEST_BINARY_DIRECTORY $ENV{BUILDDIR}) | |
10 | SET (CTEST_ROOTSYS_DIRECTORY $ENV{ROOTSYS}) | |
11 | SET (CTEST_SITE $ENV{SITE}) | |
12 | SET (CTEST_BUILD_NAME $ENV{LABEL}) | |
13 | SET (CTEST_CMAKE_GENERATOR "Unix Makefiles") | |
14 | SET (CTEST_PROJECT_NAME "ALIROOT") | |
15 | ||
16 | Find_program(CTEST_GIT_COMMAND NAMES git) | |
17 | Set(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 | SET (BUILD_COMMAND "make") | |
24 | SET (CTEST_BUILD_COMMAND "${BUILD_COMMAND} -j$ENV{number_of_processors}") | |
25 | ||
26 | If($ENV{ctest_model} MATCHES Nightly) | |
27 | ||
1f345bcb | 28 | Set (CTEST_CONFIGURE_COMMAND " \"${CMAKE_EXECUTABLE_NAME}\" \"-DCMAKE_BUILD_TYPE=NIGHTLY\" \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\" \"-DROOTSYS=${CTEST_ROOTSYS_DIRECTORY}\" ") |
ac23a950 | 29 | |
30 | # get the information about conflicting or localy modified files | |
31 | # from svn, extract the relavant information about the file name | |
32 | # and put the result in the output variable | |
33 | # execute_process(COMMAND svn stat -u | |
34 | # COMMAND grep ^[CM] | |
35 | # COMMAND cut -c21- | |
36 | # OUTPUT_VARIABLE FILELIST | |
37 | # ) | |
38 | ||
39 | # create out of the output a cmake list. This step is done to convert the | |
40 | # stream into seperated filenames. | |
41 | # The trick is to exchange an "\n" by an ";" which is the separartor in | |
42 | # a list created by cmake | |
43 | # STRING(REGEX REPLACE "\n" ";" _result "${FILELIST}") | |
44 | ||
45 | # FOREACH(_file ${_result}) | |
46 | # STRING(STRIP "${_file}" _file1) | |
47 | # SET (CTEST_NOTES_FILES ${CTEST_NOTES_FILES} "${CTEST_SOURCE_DIRECTORY}/${_file1}") | |
48 | # ENDFOREACH(_file ${_result}) | |
49 | ||
50 | CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY}) | |
51 | ||
52 | endif($ENV{ctest_model} MATCHES Nightly) | |
53 | ||
54 | configure_file(${CTEST_SOURCE_DIRECTORY}/CTestCustom.cmake | |
55 | ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake | |
56 | ) | |
57 | ctest_read_custom_files("${CTEST_BINARY_DIRECTORY}") | |
58 | ||
59 | CTEST_START ($ENV{ctest_model}) | |
60 | CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}") | |
61 | CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}") | |
62 | CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}") | |
63 | CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL $ENV{number_of_processors}) | |
64 | CTEST_SUBMIT () | |
65 |