Difference between revisions of "Documentation/Nightly/Developers/Build Instructions/Compile"

From Slicer Wiki
Jump to: navigation, search
(4.1 -> Nightly)
 
Tag: 2017 source edit
 
(10 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== BUILD Slicer4 ==
+
<noinclude>{{documentation/versioncheck}}</noinclude>
After configuration, start the build process in the  <code>Slicer4-SuperBuild</code> directory
+
==BUILD Slicer==
  
=== Per-platform instructions===
+
After configuration, start the build process in the  <code>Slicer-SuperBuild</code> directory
==== Windows ====
 
* Open <code>Slicer4-SuperBuild\Slicer.sln</code> in Visual Studio
 
* Select your build configuration. Usually '''Release''' of '''Debug'''
 
* Build the <code>ALL_BUILD</code> project.
 
  
* If you make local changes to Slicer4, open the solution file located in the directory <code>Slicer4-SuperBuild/Slicer-build</code> instead. You should then be able to either build all projects or just a specific one.
+
{| width="100%"
 +
! width="50%" style="border-bottom: 1px solid darkgrey;font-size: 75%;" |Linux or MacOSX (Makefile)
 +
! width="50%" style="border-bottom: 1px solid darkgrey;font-size: 75%;" |Windows (Visual Studio)
 +
|-
 +
| valign="top" |
 +
Start a terminal.
 +
{{pre2|scroll|
 +
$ cd ~/Projects/Slicer-SuperBuild
  
==== Unix-like ====
+
$ make -j<NUMBEROFCORES>}}
  
  cd ~/Projects/Slicer4-SuperBuild
+
In case of file download hash mismatch error, you need to acquire the latest wget, and build cmake with OpenSSL turned on. For more information, see [http://slicer-devel.65872.n3.nabble.com/How-to-solve-wget-error-certificate-common-name-c-ssl-fastly-net-doesn-t-match-requested-host-name-p-td4031491.html here] and [http://slicer-devel.65872.n3.nabble.com/Re-Hash-Error-td4031386.html here]
  make -j<NUMBEROFCORES>
+
 
 +
When using the -j option, the build will continue past the source of the first error.  If the build fails and you don't see what failed, rebuild without the -j option.  Or, to speed up this process build first with the -j and -k options and then run plain make.  The -k option will make the build keep going so that any code that can be compiled independent of the error will be completed and the second make will reach the error condition more efficiently.
 +
 
 +
| valign="top" |
 +
Start Windows Explorer. [http://www.wikihow.com/Open-Windows-Explorer Need help?]
 +
<ol start="1" style="list-style-type: decimal;">
 +
<li>Open <code>Slicer-SuperBuild\Slicer.sln</code> in Visual Studio</li>
 +
<li>Select build configuration. Usually '''Release''' or '''Debug'''</li>
 +
<li>Select menu <code>Project -> Build Solution</code></li>
 +
</ol>
 +
 
 +
If you make local changes to Slicer, open the solution file located in the directory <code>Slicer-SuperBuild/Slicer-build</code> instead. You should then be able to either build all projects or just a specific one.
 +
|}

Latest revision as of 21:31, 18 November 2019

Home < Documentation < Nightly < Developers < Build Instructions < Compile


For the latest Slicer documentation, visit the read-the-docs.


BUILD Slicer

After configuration, start the build process in the Slicer-SuperBuild directory

Linux or MacOSX (Makefile) Windows (Visual Studio)

Start a terminal.

$ cd ~/Projects/Slicer-SuperBuild

$ make -j<NUMBEROFCORES>

In case of file download hash mismatch error, you need to acquire the latest wget, and build cmake with OpenSSL turned on. For more information, see here and here

When using the -j option, the build will continue past the source of the first error. If the build fails and you don't see what failed, rebuild without the -j option. Or, to speed up this process build first with the -j and -k options and then run plain make. The -k option will make the build keep going so that any code that can be compiled independent of the error will be completed and the second make will reach the error condition more efficiently.

Start Windows Explorer. Need help?

  1. Open Slicer-SuperBuild\Slicer.sln in Visual Studio
  2. Select build configuration. Usually Release or Debug
  3. Select menu Project -> Build Solution

If you make local changes to Slicer, open the solution file located in the directory Slicer-SuperBuild/Slicer-build instead. You should then be able to either build all projects or just a specific one.