1 # ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
7 # This software is governed by the CeCILL-B license under French law and
8 # abiding by the rules of distribution of free software. You can use,
9 # modify and/ or redistribute the software under the terms of the CeCILL-B
10 # license as circulated by CEA, CNRS and INRIA at the following URL
11 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
12 # or in the file LICENSE.txt.
14 # As a counterpart to the access to the source code and rights to copy,
15 # modify and redistribute granted by the license, users are provided only
16 # with a limited warranty and the software's author, the holder of the
17 # economic rights, and the successive licensors have only limited
20 # The fact that you are presently reading this means that you have had
21 # knowledge of the CeCILL-B license and that you accept its terms.
22 # ------------------------------------------------------------------------ */
26 # Adapted from vtk dashboard : arkadia.kitware all-debug-g++
28 # Style note: to distinguish between variables recognized by cmake/ctest and
29 # user-defined variables, user-defined ones are declared lower case
30 # Style note: lower case flavor of the cmake commands is used.
32 cmake_minimum_required(VERSION 2.6)
34 set(CTEST_PROJECT_NAME creaContours)
36 #################################################################
37 ## TO CHANGE TO YOUR LOCAL CONFIG :
38 set(CTEST_SITE "outang")
40 set(CTEST_CMAKE_GENERATOR "Visual Studio 7 .NET 2003")
41 set(CTEST_BUILD_CONFIGURATION "RelWithDebInfo")
42 set(CMakeCacheFile "${CTEST_PROJECT_NAME}-CMakeCache.txt")
43 set(CVSROOT ":ssh:guigues@cvs.creatis.insa-lyon.fr:/cvs/creatis")
44 set(CTEST_DASHBOARD_ROOT "D:/guigues/dashboards")
45 #################################################################
47 #################################################################
49 set(MODEL Experimental)
51 set(CVS "C:/Program Files/TortoiseCVS/cvs")
52 set(CTEST_UPDATE_COMMAND "${CVS} -d ${CVSROOT} up -dAP")
53 set(CTEST_CHECKOUT_COMMAND "${CVS} -d ${CVSROOT} co ${CTEST_PROJECT_NAME}")
54 #################################################################
56 #################################################################
57 # NOTHING FOR USER BELOW
59 set(CTEST_BUILD_NAME "${CTEST_PROJECT_NAME}-${CTEST_SITE}-${arch}-${CTEST_BUILD_CONFIGURATION}")
61 set(source_dir ${CTEST_PROJECT_NAME})
62 #set(extra_source_dir "VTKData")
63 set(build_dir ${CTEST_PROJECT_NAME}-${CTEST_BUILD_CONFIGURATION})
64 set(CTEST_TEST_TIMEOUT 140) # 70 seconds. 70 seconds is probably not enough when coverage is ON.
66 #set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
67 #set(CTEST_BUILD_COMMAND "make -j${NUMBER_OF_CPU}")
70 set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
71 set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${source_dir}")
72 set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${build_dir}")
74 set(CTEST_COVERAGE_COMMAND "/usr/bin/gcov") # REQUIRED with new ctest script style.
76 # --coverage: -fprofile-arcs -ftest-coverage (when compiling)
77 # --coverage: -lgcov (when linking)
79 ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
83 #set(advanced_flags"-Wpointer-arith -Winvalid-pch -Wcast-align -Wwrite-strings -fstack-protector-all -D_FORTIFY_SOURCE=2 -Wconversion")
85 set(cov_options "-fprofile-arcs -ftest-coverage")
87 set(common_flags "-fdiagnostics-show-option -Wall -Wextra -Wshadow ${advanced_flags} ${cov_options}")
91 #set(advanced_c_flags "-Wtraditional-conversion")
94 set(advanced_cxx_flags)
95 #set(advanced_cxx_flags "-Wstrict-null-sentinel -Wsign-conversion -Wsign-promo")
97 #MESSAGE(STATUS ${CTEST_SCRIPT_DIRECTORY})
100 ${CTEST_SCRIPT_DIRECTORY}/${CMakeCacheFile}
101 ${CTEST_BINARY_DIRECTORY}/CMakeCache.txt
104 set(CTEST_UPDATE_COMMAND "cvs")
106 # set any extra directories to do an update on
107 #if(NOT EXISTS "${CTEST_DASHBOARD_ROOT}/${source_dir}")
108 # message("Initial checkout of ${CTEST_PROJECT_NAME}")
110 # COMMAND "${CTEST_UPDATE_COMMAND}" -q co ${CTEST_PROJECT_NAME}
111 # WORKING_DIRECTORY "${CTEST_DASHBOARD_ROOT}"
113 #else(NOT EXISTS "${CTEST_DASHBOARD_ROOT}/${source_dir}")
115 # COMMAND "${CTEST_UPDATE_COMMAND}" -q up "-PdA"
116 # WORKING_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${source_dir}"
118 #endif(NOT EXISTS "${CTEST_DASHBOARD_ROOT}/${source_dir}")
120 ctest_start(${MODEL})
121 ctest_update(SOURCE "${CTEST_SOURCE_DIRECTORY}")
122 ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}")
123 ctest_read_custom_files("${CTEST_BINARY_DIRECTORY}")
124 ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}")
126 # save LD_LIBRARY_PATH
127 #set(saved_ld_library_path "$ENV{LD_LIBRARY_PATH}")
129 # Change it so that JavaRegression test can pass.
130 #set(ENV{LD_LIBRARY_PATH} "/usr/lib/jvm/java-6-sun/jre/lib/i386/xawt:${saved_ld_libray_path}")
131 #ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}")
133 #ctest_coverage(BUILD "${CTEST_BINARY_DIRECTORY}")
135 # restore LD_LIBRARY_PATH
136 #set(ENV{LD_LIBRARY_PATH} "${saved_ld_library_path}")
138 #ctest_memcheck(BUILD "${CTEST_BINARY_DIRECTORY}")