source: PSPA/madxPSPA/cmake/cdash_madx.cmake @ 430

Last change on this file since 430 was 430, checked in by touze, 11 years ago

import madx-5.01.00

File size: 1.7 KB
Line 
1# This is a script for testing the source and submitting
2# your results to a common server (cdash).
3# You can find the server at:
4# http://cern.ch/yngve/cdash/index.php?project=Mad-X
5#
6# How to:
7#  - check out the source from svn in a temporary directory, from the url
8#     http://svnweb.cern.ch/guest/madx/trunk/madX/
9#  - set the CTEST_SOURCE_DIRECTORY accordingly below
10#  - set a useful test site name (e.g. "your name"."machine type")
11#  - set a useful build name (e.g. architecture, os and compiler used)
12#  - Run this script with the command:
13#          ctest -S cdash_madx.cmake
14
15# Necessary edits:
16SET(CTEST_SITE "myname.maymachine")
17set(CTEST_BUILD_NAME "SLC5-64bit-gfortran")
18# Your source should be checked out from svn into this directory:
19set(CTEST_SOURCE_DIRECTORY "/path/to/source/madX/")
20# and compilation will be done in this directory (no need to edit, must be unique for every configuration):
21set(CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}/build")
22
23# Optional edits:
24ctest_start(Experimental)
25set(cfg_options
26 -DCMAKE_BUILD_TYPE=Release
27 )
28
29# Do not edit (unless you know cmake/ctest):
30
31set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
32set(CTEST_UPDATE_COMMAND "svn")
33
34if(CTEST_CMAKE_GENERATOR STREQUAL "Unix Makefiles")
35    include(${CTEST_SOURCE_DIRECTORY}/cmake/setupProcessorCount.cmake)
36    if(PROCESSOR_COUNT)
37        set(CTEST_BUILD_FLAGS "${CTEST_BUILD_FLAGS} -j${PROCESSOR_COUNT}")
38    endif()
39endif()
40
41ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
42 
43ctest_update()
44 
45ctest_configure(OPTIONS "${cfg_options}")
46ctest_build(NUMBER_ERRORS MADX_BUILD_ERRORS)
47if(NOT ${MADX_BUILD_ERRORS})
48   ctest_test()
49   # coverage test doesn't work at the moment..
50   #ctest_coverage()
51endif()
52ctest_submit()
Note: See TracBrowser for help on using the repository browser.