From SlicerWiki
Jump to: navigation, search
Home < Documentation < Nightly < Developers < Tutorials < DashboardSetup


  • Install recommended compiler for your system
  • Install/build prerequisites as described here:
    • CMake (use the latest CMake stable release)
    • git
    • svn
    • Qt
    • NSIS (only on Windows)

General Instruction

Disable detachedHead warnings:

git config --global advice.detachedHead false

Follow these instructions to set up dashboard:

  • Type the followings into a terminal window (on Windows use PowerShell)
$ cd ~
$ mkdir Dashboards
$ mkdir DashboardScripts
$ cd DashboardScripts


$ wget
$ mv SlicerDashboardScript.TEMPLATE.cmake <MachineName>_<OperatingSystem>-64bits_slicer_release_nightly.cmake


$ wget -OutFile <MachineName>_<OperatingSystem>-64bits_slicer_release_nightly.cmake

Edit the file <MachineName>_<OperatingSystem>-64bits_slicer_release_nightly.cmake to match your machine settings. You should update the following variables:

set(MY_OPERATING_SYSTEM   "<OperatingSystem>") # Windows, Linux, Darwin...
set(MY_COMPILER           "g++4.4.3") # On Windows it is most likely VS2013
set(MY_QT_VERSION         "4.7.4")
set(QT_QMAKE_EXECUTABLE   "$ENV{HOME}/Projects/QtSDK-1.2/Desktop/Qt/474/gcc/bin/qmake")
set(CTEST_SITE            "karakoram.kitware")
set(SCRIPT_MODE "nightly")

If git and svn are not in the path, make sure to set the variables CTEST_SVN_COMMAND and CTEST_GIT_COMMAND to the .cmake file. For example:

set(CTEST_SVN_COMMAND "c:/Program Files/SlikSvn/bin/svn.exe")
set(CTEST_GIT_COMMAND "c:/Program Files/Git/bin/git.exe")

By default, the following directory will be created:

  <CTEST_DASHBOARD_ROOT>/Slicer-<DIRECTORY_IDENTIFIER>        # Source directory
  <CTEST_DASHBOARD_ROOT>/Slicer-<DIRECTORY_IDENTIFIER>-build  # Build directory

The associated build options will be combined together to create an empty text file with the following name:


This approach has been implemented to keep build directory short and overcome path length limitation specific to windows.

It means that if you setting up more than on client in a given <CTEST_DASHBOARD_ROOT> folder, you MUST increment the value associated with DIRECTORY_IDENTIFIER variable.

Finally, you can use CTEST_BUILD_FLAGS to set the number of CPUs to be used by make (eg, -j4), and CTEST_PARALLEL_LEVEL to set the number of tests to run in parallel (see comments in the configuration script).

Scheduling on Unix-like

So that your dashboard can automatically start at 11pm daily, you could add an entry similar to the following one in your crontab. (On ubuntu, I am running crontab -e to edit the current user cron list)

0 23 * * * /path/to/cmake-2.8.7/bin/ctest -S /Users/JOE/DashboardScripts/<MachineName>_<OperatingSystem>-64bits_slicer_release_nightly.cmake -VV -O /Users/JOE/Dashboards/Logs/<MachineName>-<OperatingSystem>-64bits_slicer_release_nightly.log

Scheduling on Mac OS X

Mac OS X is deprecating the use of cron in favor of launchd.

Create a file $HOME/Library/LaunchAgents/org.slicer.NightlyDashboard.plist

This is Jim's plist file which has extra EnvironmentVariables to get through his firewall.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">







You can manually load this agent using

$ launchctl load $HOME/Library/LaunchAgents/org.slicer.NightlyDashboard.plist

and the agent will be reloaded automatically on a reboot.

It seems I have to be logged onto the console for the launch agent to get installed and run. What I do is log on, then select "Login Window..." so that other people can log onto the console. This is suboptimal as I need to do this after each reboot of the system.

Scheduling on Windows

Create a .bat file that performs the build

For example, a clean nightly build can be performed by a batch file like this:

rmdir /S /Q c:\SAB\Slicer-build-64bit-nightly
"c:\Program Files (x86)\CMake\bin\ctest.exe" -S .\Windows7-64bits_Slicer_Release_Nightly.cmake -VV c:\SAB\Logs\Windows7-64bits_Slicer_Release_Nightly.log -C Release

Create a new scheduled task that runs the .bat file

  • Windows XP: Create a new scheduled task at Control Panel / Scheduled Tasks / Add Scheduled
  • Windows 7: Task scheduler can be found at Start Menu / All Programs / Accessories / System Tools / Task Scheduler.

Setting up a continuous dashboard

Similarly if you want to setup a continuous dashboard,

$ cp <MachineName>_<OperatingSystem>-64bits_slicer_release_nightly.cmake <MachineName>_<OperatingSystem>-64bits_slicer_release_continuous.cmake

Edit <MachineName>_<OperatingSystem>-64bits_slicer_release_continuous.cmake and set

set(SCRIPT_MODE "*continuous*")

Then add the corresponding entry in crontab so that it starts everyday at 6am:

0 6 * * * /path/to/cmake-2.8.7/bin/ctest -S /Users/JOE/DashboardScripts/<MachineName>_<OperatingSystem>-64bits_slicer_release_continuous.cmake -VV -O /Users/JOE/Dashboards/Logs/<MachineName>_<OperatingSystem>-64bits_slicer_release_nightly.log

The output of the build is contained in ctest_package_make_package_output.txt in your slicer build directory, you can check this file if something went wrong.

Factory machines setup

Tool used for task scheduling is described here: Documentation/Nightly/Developers/Factory

Dashboard scripts used on the factory are available here:

More details available here:


Setting up a dashboard on a Windows machine

Disabling TortoiseSVN Icon Overlay

If you're using an interface for version control such as TortoiseSVN, make sure in the Icon Overlay settings that the status cache is set to None.

Make sure the status cache is set to "None."

Keep short path

Keep the paths to your Nightly, Continuous, and Experimental directories as terse as possible. A good standard is C:\D for dashboards, and C:\D\<N,C,E> subdirectories for Nightly, Continuous, and Experimental. Otherwise, CMake will choke on the paths.

How can I prevent the “… has stopped working” window

As documented here, set registry key HKEY_LOCAL_MACHINE\Software\Microsoft\.NETFramework\DbgJITDebugLaunchSetting value to 1.

Value 1 simply return control. This results in a stack dump, after which the process is terminated.

This has been documented while trying to prevent the dialog "Microsoft Visual Studio 8 has stopped working" from appearing when Slicer extensions dashboard were running. The details associated with the dialog were:

Problem signature:
  Problem Event Name:	BEX
  Application Name:	devenv.exe
  Application Version:	9.0.21022.8
  Application Timestamp:	47317b3d
  Fault Module Name:	VCProjectEngine.dll_unloaded
  Fault Module Version:
  Fault Module Timestamp:	47318038
  Exception Offset:	72dbdce0
  Exception Code:	c0000005
  Exception Data:	00000008


Lockhunter: Unlock directories or folders

Often on Windows, once a dashboard build is started, it is impossible to delete anything from the source or build directory. Windows will report that this file is currently in use by another program, or "locking" it. For this, we recommend installing Lockhunter.

Lockhunter screenshot