Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
MITKDashboardScript.TEMPLATE.cmake
Go to the documentation of this file.
1 #
2 # OS: Ubuntu 9.04 2.6.28-18-generic
3 # Hardware: x86_64 GNU/Linux
4 # GPU: NA
5 #
6 
7 # Note: The specific version and processor type of this machine should be reported in the
8 # header above. Indeed, this file will be send to the dashboard as a NOTE file.
9 
10 cmake_minimum_required(VERSION 3.14.5 FATAL_ERROR)
11 
12 #
13 # Dashboard properties
14 #
15 
16 set(MY_COMPILER "gcc-4.9.x")
17 # For Windows, e.g.
18 #set(MY_COMPILER "VC12.0")
19 
20 set(CTEST_CMAKE_COMMAND "/usr/bin/cmake")
21 set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
22 set(CTEST_DASHBOARD_ROOT "/opt/dartclients")
23 # For Windows, e.g.
24 #set(CTEST_CMAKE_COMMAND "cmake")
25 #set(CTEST_CMAKE_GENERATOR "Visual Studio 16 2019")
26 #set(CTEST_CMAKE_GENERATOR_PLATFORM "x64")
27 #set(CTEST_DASHBOARD_ROOT "D:/dc")
28 
29 set(MITK_EXTENSIONS # "<repo>|<branch/tag/commit>|<src dir>"
30 # "https://phabricator.mitk.org/source/mitk-projecttemplate.git|master|MITK-ProjectTemplate"
31 # "https://phabricator.mitk.org/source/mitk-diffusion.git|master|MITK-Diffusion"
32 )
33 
34 #
35 # Dashboard options
36 #
37 set(WITH_KWSTYLE FALSE)
38 set(WITH_MEMCHECK FALSE)
39 set(WITH_COVERAGE FALSE)
40 set(WITH_DOCUMENTATION FALSE)
41 #set(DOCUMENTATION_ARCHIVES_OUTPUT_DIRECTORY ) # for example: $ENV{HOME}/Projects/Doxygen
42 set(CTEST_BUILD_CONFIGURATION "Release")
43 set(CTEST_TEST_TIMEOUT 500)
44 if(UNIX)
45  set(CTEST_BUILD_FLAGS "-j4") # Use multiple CPU cores to build
46 else()
47  set(CTEST_BUILD_FLAGS "")
48 endif()
49 
50 # experimental:
51 # - run_ctest() macro will be called *ONE* time
52 # - binary directory will *NOT* be cleaned
53 # continuous:
54 # - run_ctest() macro will be called EVERY 5 minutes ...
55 # - binary directory will *NOT* be cleaned
56 # - configure/build will be executed *ONLY* if the repository has been updated
57 # nightly:
58 # - run_ctest() macro will be called *ONE* time
59 # - binary directory *WILL BE* cleaned
60 set(SCRIPT_MODE "experimental") # "experimental", "continuous", "nightly"
61 
62 #
63 # Project specific properties
64 #
65 # In order to shorten the global path length, the build directory for each DartClient
66 # uses the following abrevation sceme:
67 # For build configuration:
68 # Debug -> d
69 # Release -> r
70 # For scripte mode:
71 # continuous -> c
72 # nightly -> n
73 # experimental -> e
74 # Example directory: /MITK-sb-d-n/ for a nightly MITK superbuild in debug mode.
75 set(short_of_ctest_build_configuration "")
76 set(short_of_script_mode "")
77 string(SUBSTRING ${CTEST_BUILD_CONFIGURATION} 0 1 short_of_ctest_build_configuration)
78 string(SUBSTRING ${SCRIPT_MODE} 0 1 short_of_script_mode)
79 set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/MITK")
80 set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/MITK-sb-${short_of_ctest_build_configuration}-${short_of_script_mode}")
81 
82 # Create an initial cache file for MITK. This file is used to configure the MITK-Build. Use ADDITIONAL_CMAKECACHE_OPTION
83 # to configure the MITK-Superbuild. The
84 set(MITK_INITIAL_CACHE "
85 # Example how to set a boolean variable in the MITK-Build via this script:
86 #set(MITK_ENABLE_TOF_HARDWARE \"TRUE\" CACHE INTERNAL \"Enable ToF Hardware\")
87 # Example how to set a path variable in the MITK-Build via this script:
88 #set(MITK_PMD_LIB \"/home/kilgus/thomas/PMDSDK2/Linux_x86_64/bin/libpmdaccess2.so\" CACHE INTERNAL \"PMD lib\")
89 ")
90 
91 set(ADDITIONAL_CMAKECACHE_OPTION "
92 # Superbuild variables are not passed through to the MITK-Build (or any other build like ITK, VTK, ...)
93 # Use the MITK_INITIAL_CACHE the pass variables to the MITK-Build.
94 # add entries like this
95 #MITK_USE_OpenCV:BOOL=OFF
96 CMAKE_PREFIX_PATH:PATH=${CMAKE_PREFIX_PATH}
97 ")
98 
99 # List of test that should be explicitly disabled on this machine
100 set(TEST_TO_EXCLUDE_REGEX "")
101 
102 # set any extra environment variables here
103 set(ENV{PATH} "$ENV{PATH}")
104 
105 find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
106 find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
107 find_program(CTEST_GIT_COMMAND NAMES git)
108 
109 #
110 # Git repository - Overwrite the default value provided by the driver script
111 #
112 # The git repository containing MITK code
113 #set(GIT_REPOSITORY "/home/username/MITK")
114 # The branch of the MITK git repository to check out
115 #set(GIT_BRANCH "bug-xxx-label")
116 
117 ##########################################
118 # WARNING: DO NOT EDIT BEYOND THIS POINT #
119 ##########################################
120 
121 #
122 # Convenient macro allowing to download a file
123 #
124 macro(downloadFile url dest)
125  file(DOWNLOAD "${url}" "${dest}" STATUS status)
126  list(GET status 0 error_code)
127  list(GET status 1 error_msg)
128  if(error_code)
129  message(FATAL_ERROR "error: Failed to download ${url} - ${error_msg}")
130  endif()
131 endmacro()
132 
133 #
134 # Download and include setup script
135 #
136 if(NOT DEFINED GIT_BRANCH OR GIT_BRANCH STREQUAL "")
137  set(IS_PHABRICATOR_URL FALSE)
138  set(url "https://raw.githubusercontent.com/MITK/MITK/master/CMake/MITKDashboardSetup.cmake")
139 else()
140  set(IS_PHABRICATOR_URL TRUE)
141  string(REPLACE "/" "%252F" GIT_BRANCH_URL ${GIT_BRANCH})
142  set(url "https://phabricator.mitk.org/source/mitk/browse/${GIT_BRANCH_URL}/CMake/MITKDashboardSetup.cmake?view=raw")
143 endif()
144 set(dest ${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}.setup)
145 downloadFile("${url}" "${dest}")
146 include(${dest})
Follow Up Storage - Class to facilitate loading/accessing structured follow-up data.
Definition: testcase.h:28
downloadFile(url, dest)
static bool in(Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4)
Definition: jsoncpp.cpp:244