2 # Adapted from vtk dashboard : arkadia.kitware all-debug-g++
4 # Style note: to distinguish between variables recognized by cmake/ctest and
5 # user-defined variables, user-defined ones are declared lower case
6 # Style note: lower case flavor of the cmake commands is used.
8 cmake_minimum_required(VERSION 2.6)
10 set(CTEST_PROJECT_NAME creaImageIO)
12 #################################################################
13 ## TO CHANGE TO YOUR LOCAL CONFIG :
14 set(CTEST_SITE "outang")
16 set(CTEST_CMAKE_GENERATOR "Visual Studio 7 .NET 2003")
17 set(CTEST_BUILD_CONFIGURATION "RelWithDebInfo")
18 set(CMakeCacheFile "${CTEST_PROJECT_NAME}-CMakeCache.txt")
19 set(CVSROOT ":ssh:guigues@cvs.creatis.insa-lyon.fr:/cvs/creatis")
20 set(CTEST_DASHBOARD_ROOT "D:/guigues/dashboards")
21 #################################################################
23 #################################################################
25 set(MODEL Experimental)
27 set(CVS "C:/Program Files/TortoiseCVS/cvs")
28 set(CTEST_UPDATE_COMMAND "${CVS} -d ${CVSROOT} up -dAP")
29 set(CTEST_CHECKOUT_COMMAND "${CVS} -d ${CVSROOT} co ${CTEST_PROJECT_NAME}")
30 #################################################################
32 #################################################################
33 # NOTHING FOR USER BELOW
35 set(CTEST_BUILD_NAME "${CTEST_PROJECT_NAME}-${CTEST_SITE}-${arch}-${CTEST_BUILD_CONFIGURATION}")
37 set(source_dir ${CTEST_PROJECT_NAME})
38 #set(extra_source_dir "VTKData")
39 set(build_dir ${CTEST_PROJECT_NAME}-${CTEST_BUILD_CONFIGURATION})
40 set(CTEST_TEST_TIMEOUT 140) # 70 seconds. 70 seconds is probably not enough when coverage is ON.
42 #set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
43 #set(CTEST_BUILD_COMMAND "make -j${NUMBER_OF_CPU}")
46 set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
47 set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${source_dir}")
48 set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${build_dir}")
50 set(CTEST_COVERAGE_COMMAND "/usr/bin/gcov") # REQUIRED with new ctest script style.
52 # --coverage: -fprofile-arcs -ftest-coverage (when compiling)
53 # --coverage: -lgcov (when linking)
55 ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
59 #set(advanced_flags"-Wpointer-arith -Winvalid-pch -Wcast-align -Wwrite-strings -fstack-protector-all -D_FORTIFY_SOURCE=2 -Wconversion")
61 set(cov_options "-fprofile-arcs -ftest-coverage")
63 set(common_flags "-fdiagnostics-show-option -Wall -Wextra -Wshadow ${advanced_flags} ${cov_options}")
67 #set(advanced_c_flags "-Wtraditional-conversion")
70 set(advanced_cxx_flags)
71 #set(advanced_cxx_flags "-Wstrict-null-sentinel -Wsign-conversion -Wsign-promo")
73 #MESSAGE(STATUS ${CTEST_SCRIPT_DIRECTORY})
76 ${CTEST_SCRIPT_DIRECTORY}/${CMakeCacheFile}
77 ${CTEST_BINARY_DIRECTORY}/CMakeCache.txt
80 set(CTEST_UPDATE_COMMAND "cvs")
82 # set any extra directories to do an update on
83 #if(NOT EXISTS "${CTEST_DASHBOARD_ROOT}/${source_dir}")
84 # message("Initial checkout of ${CTEST_PROJECT_NAME}")
86 # COMMAND "${CTEST_UPDATE_COMMAND}" -q co ${CTEST_PROJECT_NAME}
87 # WORKING_DIRECTORY "${CTEST_DASHBOARD_ROOT}"
89 #else(NOT EXISTS "${CTEST_DASHBOARD_ROOT}/${source_dir}")
91 # COMMAND "${CTEST_UPDATE_COMMAND}" -q up "-PdA"
92 # WORKING_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${source_dir}"
94 #endif(NOT EXISTS "${CTEST_DASHBOARD_ROOT}/${source_dir}")
97 ctest_update(SOURCE "${CTEST_SOURCE_DIRECTORY}")
98 ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}")
99 ctest_read_custom_files("${CTEST_BINARY_DIRECTORY}")
100 ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}")
102 # save LD_LIBRARY_PATH
103 #set(saved_ld_library_path "$ENV{LD_LIBRARY_PATH}")
105 # Change it so that JavaRegression test can pass.
106 #set(ENV{LD_LIBRARY_PATH} "/usr/lib/jvm/java-6-sun/jre/lib/i386/xawt:${saved_ld_libray_path}")
107 #ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}")
109 #ctest_coverage(BUILD "${CTEST_BINARY_DIRECTORY}")
111 # restore LD_LIBRARY_PATH
112 #set(ENV{LD_LIBRARY_PATH} "${saved_ld_library_path}")
114 #ctest_memcheck(BUILD "${CTEST_BINARY_DIRECTORY}")