Medical Imaging Interaction Toolkit  2016.11.0
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.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 12 2013 Win64")
26 #set(CTEST_DASHBOARD_ROOT "C:/dartclients")
27 
28 # The directory containing the Qt binaries
29 set(QT5_INSTALL_PREFIX "/home/user/Qt/5.6/gcc_64")
30 # For Windows, e.g.
31 #set(QT5_INSTALL_PREFIX "C:/Qt/5.6/msvc2013_64")
32 
33 set(QT_BINARY_DIR "${QT5_INSTALL_PREFIX}/bin")
34 
35 #
36 # Dashboard options
37 #
38 set(WITH_KWSTYLE FALSE)
39 set(WITH_MEMCHECK FALSE)
40 set(WITH_COVERAGE FALSE)
41 set(WITH_DOCUMENTATION FALSE)
42 #set(DOCUMENTATION_ARCHIVES_OUTPUT_DIRECTORY ) # for example: $ENV{HOME}/Projects/Doxygen
43 set(CTEST_BUILD_CONFIGURATION "Release")
44 set(CTEST_TEST_TIMEOUT 500)
45 if(UNIX OR MINGW)
46  set(CTEST_BUILD_FLAGS "-j4") # Use multiple CPU cores to build
47 else()
48  set(CTEST_BUILD_FLAGS "")
49 endif()
50 
51 # experimental:
52 # - run_ctest() macro will be called *ONE* time
53 # - binary directory will *NOT* be cleaned
54 # continuous:
55 # - run_ctest() macro will be called EVERY 5 minutes ...
56 # - binary directory will *NOT* be cleaned
57 # - configure/build will be executed *ONLY* if the repository has been updated
58 # nightly:
59 # - run_ctest() macro will be called *ONE* time
60 # - binary directory *WILL BE* cleaned
61 set(SCRIPT_MODE "experimental") # "experimental", "continuous", "nightly"
62 
63 #
64 # Project specific properties
65 #
66 # In order to shorten the global path length, the build directory for each DartClient
67 # uses the following abrevation sceme:
68 # For build configuration:
69 # Debug -> d
70 # Release -> r
71 # For scripte mode:
72 # continuous -> c
73 # nightly -> n
74 # experimental -> e
75 # Example directory: /MITK-sb-d-n/ for a nightly MITK superbuild in debug mode.
76 set(short_of_ctest_build_configuration "")
77 set(short_of_script_mode "")
78 string(SUBSTRING ${CTEST_BUILD_CONFIGURATION} 0 1 short_of_ctest_build_configuration)
79 string(SUBSTRING ${SCRIPT_MODE} 0 1 short_of_script_mode)
80 set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/MITK")
81 set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/MITK-sb-${short_of_ctest_build_configuration}-${short_of_script_mode}")
82 
83 # Create an initial cache file for MITK. This file is used to configure the MITK-Build. Use ADDITIONAL_CMAKECACHE_OPTION
84 # to configure the MITK-Superbuild. The
85 set(MITK_INITIAL_CACHE "
86 # Example how to set a boolean variable in the MITK-Build via this script:
87 #SET(MITK_ENABLE_TOF_HARDWARE \"TRUE\" CACHE INTERNAL \"Enable ToF Hardware\")
88 # Example how to set a path variable in the MITK-Build via this script:
89 #SET(MITK_PMD_LIB \"/home/kilgus/thomas/PMDSDK2/Linux_x86_64/bin/libpmdaccess2.so\" CACHE INTERNAL \"PMD lib\")
90 ")
91 
92 set(ADDITIONAL_CMAKECACHE_OPTION "
93 # Superbuild variables are not passed through to the MITK-Build (or any other build like ITK, VTK, ...)
94 # Use the MITK_INITIAL_CACHE the pass variables to the MITK-Build.
95 # add entries like this
96 #MITK_USE_OpenCV:BOOL=OFF
97 CMAKE_PREFIX_PATH:PATH=${CMAKE_PREFIX_PATH}
98 ")
99 
100 # List of test that should be explicitly disabled on this machine
101 set(TEST_TO_EXCLUDE_REGEX "")
102 
103 # set any extra environment variables here
104 set(ENV{DISPLAY} ":0")
105 
106 find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
107 find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
108 find_program(CTEST_GIT_COMMAND NAMES git)
109 
110 #
111 # Git repository - Overwrite the default value provided by the driver script
112 #
113 # The git repository containing MITK code
114 #set(GIT_REPOSITORY "/home/username/MITK")
115 # The branch of the MITK git repository to check out
116 #set(GIT_BRANCH "bug-xxx-label")
117 
118 ##########################################
119 # WARNING: DO NOT EDIT BEYOND THIS POINT #
120 ##########################################
121 
122 #
123 # Convenient macro allowing to download a file
124 #
125 macro(downloadFile url dest)
126  file(DOWNLOAD "${url}" "${dest}" STATUS status)
127  list(GET status 0 error_code)
128  list(GET status 1 error_msg)
129  if(error_code)
130  message(FATAL_ERROR "error: Failed to download ${url} - ${error_msg}")
131  endif()
132 endmacro()
133 
134 #
135 # Download and include setup script
136 #
137 if(NOT DEFINED GIT_BRANCH OR GIT_BRANCH STREQUAL "")
138  set(IS_PHABRICATOR_URL FALSE)
139  set(url "https://raw.githubusercontent.com/MITK/MITK/master/CMake/MITKDashboardSetup.cmake")
140 else()
141  set(IS_PHABRICATOR_URL TRUE)
142  set(url "https://phabricator.mitk.org/source/mitk/browse/${GIT_BRANCH}/CMake/MITKDashboardSetup.cmake?view=raw")
143 endif()
144 set(dest ${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}.setup)
145 downloadFile("${url}" "${dest}")
146 include(${dest})
downloadFile(url, dest)