<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.slicer.org/w/index.php?action=history&amp;feed=atom&amp;title=Documentation%2F4.5%2FDevelopers%2FBuild_Instructions%2FConfigure</id>
	<title>Documentation/4.5/Developers/Build Instructions/Configure - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.slicer.org/w/index.php?action=history&amp;feed=atom&amp;title=Documentation%2F4.5%2FDevelopers%2FBuild_Instructions%2FConfigure"/>
	<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/4.5/Developers/Build_Instructions/Configure&amp;action=history"/>
	<updated>2026-05-17T06:44:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/4.5/Developers/Build_Instructions/Configure&amp;diff=43587&amp;oldid=prev</id>
		<title>UpdateBot: Nightly -&gt; 4.5</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/4.5/Developers/Build_Instructions/Configure&amp;diff=43587&amp;oldid=prev"/>
		<updated>2015-11-12T22:04:04Z</updated>

		<summary type="html">&lt;p&gt;Nightly -&amp;gt; 4.5&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
== CONFIGURE and generate Slicer solution files ==&lt;br /&gt;
You can configure and generate Slicer solution files using either &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type:none; border-left:thick solid red; padding-left:1em;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;While it is not enforced, we strongly recommend you to '''AVOID''' the use of '''SPACES''' for both the &amp;lt;code&amp;gt;source directory&amp;lt;/code&amp;gt; and the &amp;lt;code&amp;gt;build directory&amp;lt;/code&amp;gt;. We mean it.&lt;br /&gt;
  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Per-platform instructions===&lt;br /&gt;
==== Windows ====&lt;br /&gt;
*'''Recommended''': &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;&lt;br /&gt;
** Set the build directory. For example: &amp;lt;code&amp;gt;C:\Slicer-SuperBuild-Debug&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;C:\Slicer-SuperBuild-Release&amp;lt;/code&amp;gt;.&lt;br /&gt;
*** Because Windows [http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx#maxpath doesn't support file path longer than 260 characters] and has a [http://massmail.spl.harvard.edu/public-archives/slicer-devel/2014/016113.html maximum command line length], please make sure that the total path name of your &amp;lt;code&amp;gt;Slicer-build&amp;lt;/code&amp;gt; directory is no longer than 50 characters (for example &amp;lt;code&amp;gt;c:\work\Slicer\Slicer-SuperBuild&amp;lt;/code&amp;gt; (32 characters) is fine). In case of any build error, use very short directory names: C:\S4 for source directory, C:\S4D for debug build, C:\S4R for release build.&lt;br /&gt;
*** You cannot use the same build tree for both release or debug mode builds. If both build types are needed, then the same source directory can be used, but a separate build directory should be created and configured for each build type.&lt;br /&gt;
** Select your compiler: Visual Studio 9 2008 Win64&lt;br /&gt;
** Configure using default options. You may get a configuration error that &amp;lt;code&amp;gt;QT_QMAKE_EXECUTABLE&amp;lt;/code&amp;gt; is not set, which is normal.&lt;br /&gt;
** Verify that &amp;lt;code&amp;gt;QT_QMAKE_EXECUTABLE&amp;lt;/code&amp;gt; variable is set correctly:&lt;br /&gt;
*** CMake may automatically detect an installed version of Qt, but you may want to use a custom built version of Qt (e.g. in Debug mode for use with the designer).&lt;br /&gt;
*** Set &amp;lt;code&amp;gt;QT_QMAKE_EXECUTABLE&amp;lt;/code&amp;gt; to the path of the &amp;lt;code&amp;gt;qmake.exe&amp;lt;/code&amp;gt;, which is inside the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory (for example, &amp;lt;code&amp;gt;C:/path/to/qt-everywhere-opensource-build-4.8.6/bin/qmake.exe&amp;lt;/code&amp;gt;).&lt;br /&gt;
** If building in debug mode: SimpleITK has to be disabled for building in debug mode. See more information at http://www.na-mic.org/Bug/view.php?id=3816 (you get this error if you attempt it: LINK : fatal error LNK1104: cannot open file 'python27_d.lib')&lt;br /&gt;
** Click generate then close cmake-gui.&lt;br /&gt;
** If building in release mode:&lt;br /&gt;
*** Open the top-level Slicer.sln file in the build directory in Visual Studio&lt;br /&gt;
*** Set active configuration to Release. Visual Studio will select Debug build configuration by default when you first open the solution in the Visual Studio GUI. If you build Slicer in release mode and accidentally forget to switch the build configuration to Release then the build will fail. Note: you can avoid this manual configuration mode selection by setting &amp;lt;code&amp;gt;CMAKE_CONFIGURATION_TYPES&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;Release&amp;lt;/code&amp;gt; in cmake-gui.&lt;br /&gt;
** If building in debug mode:&lt;br /&gt;
*** Start Visual Studio using the Slicer launcher as described in [[Documentation/{{documentation/version}}/Developers/Tutorials/Debug_Instructions|Step-by-step debug instuctions]]&lt;br /&gt;
** Build the ALL_BUILD project&lt;br /&gt;
&lt;br /&gt;
==== Unix-like ====&lt;br /&gt;
*'''Recommended''': &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt;&lt;br /&gt;
** Configure using the following commands. By default '''CMAKE_BUILD_TYPE''' is set to '''Debug'''.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir Slicer-SuperBuild-Debug&lt;br /&gt;
cd Slicer-SuperBuild-Debug&lt;br /&gt;
cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQT_QMAKE_EXECUTABLE:FILEPATH=/path/to/QtSDK/Desktop/Qt/486/gcc/bin/qmake ../Slicer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
where you replace ''/path/to/QtSDK'' with the real path on your machine where QtSDK is located&lt;br /&gt;
* '''Remarks''':&lt;br /&gt;
# Using top-level directory name like &amp;lt;code&amp;gt;Slicer-SuperBuild-Release&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Slicer-SuperBuild-Debug&amp;lt;/code&amp;gt; is recommended.&lt;br /&gt;
# [[Documentation/{{documentation/version}}/Developers/Tutorials/Debug_Instructions|Step-by-step debug instuctions]]&lt;br /&gt;
&lt;br /&gt;
* On Mac OS X 10.9 (Mavericks) / 10.10 (Yosemite), also set the following variables (see [http://massmail.spl.harvard.edu/public-archives/slicer-devel/2014/thread.html#16440 discussion]):&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;4&amp;quot; cellspacing=&amp;quot;4&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
| bgcolor=&amp;quot;#abcdef&amp;quot; height=&amp;quot;8&amp;quot; |  '''Variable'''&lt;br /&gt;
| bgcolor=&amp;quot;#abcdef&amp;quot; height=&amp;quot;8&amp;quot; |  '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| Slicer_USE_PYTHONQT_WITH_TCL || OFF&lt;br /&gt;
|-&lt;br /&gt;
| CMAKE_OSX_DEPLOYMENT_TARGET  || 10.9 or 10.10&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== General information ===&lt;br /&gt;
&lt;br /&gt;
Two projects are generated by either &amp;lt;code&amp;gt;cmake&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ccmake&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;cmake-gui&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
One of them is in the top-level bin directory &amp;lt;code&amp;gt;Slicer-SuperBuild&amp;lt;/code&amp;gt; and the other one is in the subdirectory &amp;lt;code&amp;gt;Slicer-build&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Slicer-SuperBuild/Slicer-build&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# The first project in &amp;lt;code&amp;gt;Slicer-SuperBuild&amp;lt;/code&amp;gt; manages all the external dependencies of Slicer (VTK, ITK, Python, ...). To build Slicer for the first time, run make (or build the solution file in Visual Studio) in &amp;lt;code&amp;gt;Slicer-SuperBuild&amp;lt;/code&amp;gt;, which will update and build the external libraries and if successful will then build the subproject Slicer-build.&amp;lt;br&amp;gt;&lt;br /&gt;
# The second project in &amp;lt;code&amp;gt;Slicer-SuperBuild/Slicer-build&amp;lt;/code&amp;gt; is the &amp;quot;traditional&amp;quot; build directory of Slicer.  After local changes in Slicer (or after an svn update on the source directory of Slicer), only running make (or building the solution file in Visual Studio) in &amp;lt;code&amp;gt;Slicer-SuperBuild/Slicer-build&amp;lt;/code&amp;gt; is necessary (the external libraries are considered built and up to date). &amp;lt;br&amp;gt;&lt;br /&gt;
#'''Warning''': An significant amount of disk space is required to compile Slicer in Debug (&amp;gt;10GB on Windows)&lt;br /&gt;
&lt;br /&gt;
=== Workaround firewall blocking git protocol ===&lt;br /&gt;
* Some firewall will be blocking the git protocol, a possible workaround is to configure Slicer disabling the option &amp;lt;code&amp;gt;Slicer_USE_GIT_PROTOCOL&amp;lt;/code&amp;gt;. Then http protocol will be used instead. Consider also reading https://github.com/commontk/CTK/issues/33&lt;br /&gt;
&lt;br /&gt;
=== Notes for advanced users ===&lt;br /&gt;
* By default, if CMake finds Java on your machine, it automatically builds Java CLIs. If you don't want any Java in your Slicer (or if you don't want to install Java on your Mac Os X), you can pass &amp;lt;code&amp;gt;-DCMAKE_DISABLE_FIND_PACKAGE_Java:BOOL=TRUE&amp;lt;/code&amp;gt; when configuring Slicer.&lt;br /&gt;
* Same applies for OpenSSL: &amp;lt;code&amp;gt;CMAKE_DISABLE_FIND_PACKAGE_OpenSSL:BOOL=TRUE&amp;lt;/code&amp;gt; can be passed when building Slicer for packaging.&lt;/div&gt;</summary>
		<author><name>UpdateBot</name></author>
		
	</entry>
</feed>