From: guigues Date: Wed, 7 Jan 2009 15:03:36 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: CREATOOLS.2-0-3~102 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=accf8f213e799574a0b8a4491b26f89c074d17b7;p=creaToolsTools.git *** empty log message *** --- diff --git a/ctest/bbtk-osx.ctest b/ctest/bbtk-osx.ctest new file mode 100644 index 0000000..889b4c5 --- /dev/null +++ b/ctest/bbtk-osx.ctest @@ -0,0 +1,113 @@ +# 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 +# On my machine $ENV{HOSTNAME} does not work. why ? +# Have to set the host name manually +set(CTEST_SITE "cercocebe") +#$ENV{HOSTNAME}") +set(arch "osx_10.5.6") +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 "cercocebe") +#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-osx.ctest b/ctest/crea-osx.ctest new file mode 100644 index 0000000..202539b --- /dev/null +++ b/ctest/crea-osx.ctest @@ -0,0 +1,146 @@ +# 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 +# On my machine $ENV{HOSTNAME} does not work. why ? +# Have to set the host name manually +set(CTEST_SITE "cercocebe") +#$ENV{HOSTNAME}") +set(arch "osx_10.5.6") +set(buildtype "debug") +set(CMakeCacheFile "crea-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 "crea") + + +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") + +#MESSAGE(STATUS ${CTEST_SCRIPT_DIRECTORY}) + +configure_file( + ${CTEST_SCRIPT_DIRECTORY}/${CMakeCacheFile} + ${CTEST_BINARY_DIRECTORY}/CMakeCache.txt + COPY_ONLY) + +# Write initial cache. +#file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" " +#MAKECOMMAND:STRING=make -j3 -k +#CMAKE_CXX_FLAGS:STRING=${common_flags} ${advanced_cxx_flags} -Woverloaded-virtual +#CMAKE_CXX_FLAGS_DEBUG:STRING=-O0 -ggdb +#CMAKE_C_FLAGS:STRING=${common_flags} ${advanced_c_flags} +#CMAKE_C_FLAGS_DEBUG:STRING=-O0 -ggdb +#CMAKE_EXE_LINKER_FLAGS:STRING=${cov_options} +#CMAKE_SHARED_LINKER_FLAGS:STRING=${cov_options} +#CMAKE_BUILD_TYPE:STRING=Debug +#BUILD_SHARED_LIBS:BOOL=ON +#VTK_DEBUG_LEAKS:BOOL=ON +#BUILD_DOCUMENTATION:BOOL=ON +#BUILD_EXAMPLES:BOOL=ON +#JAVA_AWT_INCLUDE_PATH:PATH=/usr/lib/jvm/java-6-sun/include +#JAVA_AWT_LIBRARY:FILEPATH=/usr/lib/jvm/java-6-sun/jre/lib/i386/libjawt.so +#JAVA_INCLUDE_PATH:PATH=/usr/lib/jvm/java-6-sun/include +#JAVA_INCLUDE_PATH2:PATH=/usr/lib/jvm/java-6-sun/include/linux +#VTK_USE_BOOST:BOOL=ON +# GL2PS test broken +#VTK_USE_GL2PS:BOOL=OFF +#VTK_WRAP_JAVA:BOOL=ON +#VTK_WRAP_PYTHON:BOOL=ON +#VTK_WRAP_TCL:BOOL=ON +#VTK_USE_GUISUPPORT:BOOL=ON +#VTK_USE_QVTK:BOOL=ON +#DESIRED_QT_VERSION:STRING=4 +#VTK_USE_ODBC:BOOL=ON +#ODBC_INCLUDE_DIRECTORIES:PATH=/usr/include +#ODBC_LIBRARY:FILEPATH=/usr/lib/libodbc.so +#VTK_USE_MYSQL:BOOL=ON +#VTK_USE_POSTGRES:BOOL=ON +#VTK_LEGACY_REMOVE:BOOL=ON +#") + +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()