From: guigues Date: Wed, 7 Jan 2009 10:45:30 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: CREATOOLS.2-0-3~103 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=75f8d9b3dc404cbfff200df8ac684058ea20ed6a;p=creaToolsTools.git *** empty log message *** --- diff --git a/ctest/bbtk-linux.ctest b/ctest/bbtk-linux.ctest new file mode 100644 index 0000000..92a9bd4 --- /dev/null +++ b/ctest/bbtk-linux.ctest @@ -0,0 +1,108 @@ +# LG 06/01/08 +# Adapted from vtk dashboard : arkadia.kitware all-debug-g++ +# +# Style note: to distinguish between variables recognized by cmake/ctest and +# user-defined variables, user-defined ones are declared lower case +# Style note: lower case flavor of the cmake commands is used. + +cmake_minimum_required(VERSION 2.6) + + +################################################################# +## MANDATORY +set(arch "fc9") +set(buildtype "debug") +set(CMakeCacheFile "bbtk-debug-CMakeCache.txt") +################################################################# + +################################################################# +## CAN BE CHANGED : +set(CTEST_DASHBOARD_ROOT "$ENV{HOME}/dashboards") +set(MODEL Experimental) +set(NUMBER_OF_CPU 2) +################################################################# + +################################################################# +# NOTHING FOR USER BELOW +set(project_name "bbtk") + +set(CTEST_SITE "$ENV{HOSTNAME}") +set(CTEST_BUILD_NAME "${project_name}-${CTEST_SITE}-${arch}-${buildtype}") + +set(source_dir ${project_name}) +#set(extra_source_dir "VTKData") +set(build_dir ${CTEST_BUILD_NAME}) +set(CTEST_TEST_TIMEOUT 140) # 70 seconds. 70 seconds is probably not enough when coverage is ON. + +set(CTEST_CMAKE_GENERATOR "Unix Makefiles") +set(CTEST_BUILD_COMMAND "make -j${NUMBER_OF_CPU}") + + +set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") +set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${source_dir}") +set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${build_dir}") + +set(CTEST_COVERAGE_COMMAND "/usr/bin/gcov") # REQUIRED with new ctest script style. + +# --coverage: -fprofile-arcs -ftest-coverage (when compiling) +# --coverage: -lgcov (when linking) + +ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) + +# Common C/C++ flags: +set(advanced_flags) +#set(advanced_flags"-Wpointer-arith -Winvalid-pch -Wcast-align -Wwrite-strings -fstack-protector-all -D_FORTIFY_SOURCE=2 -Wconversion") + +set(cov_options "-fprofile-arcs -ftest-coverage") + +set(common_flags "-fdiagnostics-show-option -Wall -Wextra -Wshadow ${advanced_flags} ${cov_options}") + +# C specific flags: +set(advanced_c_flags) +#set(advanced_c_flags "-Wtraditional-conversion") + +# C++ specific flags: +set(advanced_cxx_flags) +#set(advanced_cxx_flags "-Wstrict-null-sentinel -Wsign-conversion -Wsign-promo") + + +configure_file( + ${CTEST_SCRIPT_DIRECTORY}/${CMakeCacheFile} + ${CTEST_BINARY_DIRECTORY}/CMakeCache.txt + COPY_ONLY) + + +set(CTEST_UPDATE_COMMAND "cvs") + +# set any extra directories to do an update on +if(NOT EXISTS "${CTEST_DASHBOARD_ROOT}/${source_dir}") + message("Initial checkout of ${project_name}") + execute_process( + COMMAND "${CTEST_UPDATE_COMMAND}" -q -z3 co ${project_name} + WORKING_DIRECTORY "${CTEST_DASHBOARD_ROOT}" + ) +else(NOT EXISTS "${CTEST_DASHBOARD_ROOT}/${source_dir}") + execute_process( + COMMAND "${CTEST_UPDATE_COMMAND}" -q -z3 up "-PdA" + WORKING_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${source_dir}" + ) +endif(NOT EXISTS "${CTEST_DASHBOARD_ROOT}/${source_dir}") + +ctest_start(${MODEL}) +ctest_update(SOURCE "${CTEST_SOURCE_DIRECTORY}") +ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}") +ctest_read_custom_files("${CTEST_BINARY_DIRECTORY}") +ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}") + +# save LD_LIBRARY_PATH +#set(saved_ld_library_path "$ENV{LD_LIBRARY_PATH}") + +# Change it so that JavaRegression test can pass. +#set(ENV{LD_LIBRARY_PATH} "/usr/lib/jvm/java-6-sun/jre/lib/i386/xawt:${saved_ld_libray_path}") +ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}") +ctest_coverage(BUILD "${CTEST_BINARY_DIRECTORY}") +# restore LD_LIBRARY_PATH +#set(ENV{LD_LIBRARY_PATH} "${saved_ld_library_path}") + +#ctest_memcheck(BUILD "${CTEST_BINARY_DIRECTORY}") +#ctest_submit() diff --git a/ctest/crea-linux.ctest b/ctest/crea-linux.ctest index dc34949..41ad6c9 100644 --- a/ctest/crea-linux.ctest +++ b/ctest/crea-linux.ctest @@ -19,6 +19,7 @@ set(CMakeCacheFile "crea-debug-CMakeCache.txt") ## CAN BE CHANGED : set(CTEST_DASHBOARD_ROOT "$ENV{HOME}/dashboards") set(MODEL Experimental) +set(NUMBER_OF_CPU 2) ################################################################# ################################################################# @@ -34,7 +35,7 @@ set(build_dir ${CTEST_BUILD_NAME}) set(CTEST_TEST_TIMEOUT 140) # 70 seconds. 70 seconds is probably not enough when coverage is ON. set(CTEST_CMAKE_GENERATOR "Unix Makefiles") -set(CTEST_BUILD_COMMAND "make -j3") +set(CTEST_BUILD_COMMAND "make -j${NUMBER_OF_CPU}") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")