[430] | 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: |
---|
| 16 | SET(CTEST_SITE "myname.maymachine") |
---|
| 17 | set(CTEST_BUILD_NAME "SLC5-64bit-gfortran") |
---|
| 18 | # Your source should be checked out from svn into this directory: |
---|
| 19 | set(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): |
---|
| 21 | set(CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}/build") |
---|
| 22 | |
---|
| 23 | # Optional edits: |
---|
| 24 | ctest_start(Experimental) |
---|
| 25 | set(cfg_options |
---|
| 26 | -DCMAKE_BUILD_TYPE=Release |
---|
| 27 | ) |
---|
| 28 | |
---|
| 29 | # Do not edit (unless you know cmake/ctest): |
---|
| 30 | |
---|
| 31 | set(CTEST_CMAKE_GENERATOR "Unix Makefiles") |
---|
| 32 | set(CTEST_UPDATE_COMMAND "svn") |
---|
| 33 | |
---|
| 34 | if(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() |
---|
| 39 | endif() |
---|
| 40 | |
---|
| 41 | ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) |
---|
| 42 | |
---|
| 43 | ctest_update() |
---|
| 44 | |
---|
| 45 | ctest_configure(OPTIONS "${cfg_options}") |
---|
| 46 | ctest_build(NUMBER_ERRORS MADX_BUILD_ERRORS) |
---|
| 47 | if(NOT ${MADX_BUILD_ERRORS}) |
---|
| 48 | ctest_test() |
---|
| 49 | # coverage test doesn't work at the moment.. |
---|
| 50 | #ctest_coverage() |
---|
| 51 | endif() |
---|
| 52 | ctest_submit() |
---|