TubeTK/Build Instructions: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
No edit summary
Line 53: Line 53:
==== Linux and OS X ====
==== Linux and OS X ====


  cd ~/src/TubeTK-Release
mkdir ~/TubeTK-Release
  cd ~/TubeTK-Release
  cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ../TubeTK
  cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ../TubeTK


Line 71: Line 72:


* Perform the initial build using your compiler at the top-level of TubeTK-Release.  This will update and build the libraries that TubeTK depends on (ex. VTK, ITK), and then build TubeTK.
* Perform the initial build using your compiler at the top-level of TubeTK-Release.  This will update and build the libraries that TubeTK depends on (ex. VTK, ITK), and then build TubeTK.
  cd ~/src/TubeTK-Release
  cd ~/TubeTK-Release
  make -j4
  make
* Subsequent builds should be initiated in the subdir TubeTK-Release/TubeTK-build to save time.  This will build TubeTK only.  You may have to periodically build from the top-level of TubeTK-Release to get updates to the libraries that TubeTK depends on.
* Subsequent builds should be initiated in the subdir TubeTK-Release/TubeTK-build to save time.  This will build TubeTK only.  You may have to periodically build from the top-level of TubeTK-Release to get updates to the libraries that TubeTK depends on.
  cd ~/src/TubeTK-Release/TubeTK-build
  cd ~/TubeTK-Release/TubeTK-build
  make -j4
  make


= Advanced =
= Advanced =
Line 83: Line 84:
For introductory information, see: [http://public.kitware.com/KWStyle/ http://public.kitware.com/KWStyle/].
For introductory information, see: [http://public.kitware.com/KWStyle/ http://public.kitware.com/KWStyle/].
   git clone http://public.kitware.com/KWStyle.git
   git clone http://public.kitware.com/KWStyle.git
   mkdir KWStyle-Release
   mkdir ~/KWStyle-Release
   cd KWStyle-Release
   cd ~/KWStyle-Release
   cmake -DCMAKE_BUILD_TYPE=Release ../KWStyle
   cmake -DCMAKE_BUILD_TYPE=Release ../KWStyle
   make
   make
   sudo make install
   sudo make install


   cd TubeTK-Release
   cd ~/TubeTK-Release
   cmake -DTubeTK_USE_KWSTYLE=ON -DKWSTYLE_EXECUTABLE=/usr/local/bin/KWStyle .
   cmake -DTubeTK_USE_KWSTYLE=ON -DKWSTYLE_EXECUTABLE=/usr/local/bin/KWStyle .
   make
   make

Revision as of 16:59, 27 August 2013

Overview

TubeTK has been tested on Windows, OS X, and Linux.

  • Process
    • Install dependencies
    • Download source
    • Configure using CMake
    • Build

Dependencies

Minimum requirements:

See the Dependencies page on GitHub for minimum versions and a complete list.

Download, Configure, and Build

You have two options:

1. Have CTest do all of the remaining work

This is the recommended approach for people who will be using and developing in TubeTK. It not only builds and tests TubeTK with minimal effort, but it also submits your build as an "experimental" on the TubeTK dashboard - this allows us to more easily help you debug errors during the build process:

ctest -S <name_of_your_script_file.cmake>
This will download the source code, configure it, build it, test it, and then submit the results to the TubeTK Dashboard

2. Download, configure, and build manually

2a. Download and manage your Git repository

git clone https://github.com/TubeTK/TubeTK

2b. Configure

Windows

Linux and OS X

mkdir ~/TubeTK-Release
cd ~/TubeTK-Release
cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ../TubeTK

2c. Build

Windows

Microsoft Visual Studio

  • Load the TubeTK solution file
    • Select File -> Open -> Project/Solution -> open TubeTK-Release/TubeTK.sln
  • Perform the initial build using your compiler at the top-level of TubeTK-Release. This will update and build the libraries that TubeTK depends on (ex. VTK, ITK), and then build TubeTK.
    • Right click on the "ALL_BUILD" project and select "Build".
  • Subsequent builds should be initiated in the subdir TubeTK-Release/TubeTK-build to save time. This will build TubeTK only. You may have to periodically build from the top-level of TubeTK-Release to get updates to the libraries that TubeTK depends on.
    • Right click on the "TubeTK" project and select "Build".

Linux and OS X

  • Perform the initial build using your compiler at the top-level of TubeTK-Release. This will update and build the libraries that TubeTK depends on (ex. VTK, ITK), and then build TubeTK.
cd ~/TubeTK-Release
make
  • Subsequent builds should be initiated in the subdir TubeTK-Release/TubeTK-build to save time. This will build TubeTK only. You may have to periodically build from the top-level of TubeTK-Release to get updates to the libraries that TubeTK depends on.
cd ~/TubeTK-Release/TubeTK-build
make

Advanced

Using KWStyle

For introductory information, see: http://public.kitware.com/KWStyle/.

 git clone http://public.kitware.com/KWStyle.git
 mkdir ~/KWStyle-Release
 cd ~/KWStyle-Release
 cmake -DCMAKE_BUILD_TYPE=Release ../KWStyle
 make
 sudo make install
 cd ~/TubeTK-Release
 cmake -DTubeTK_USE_KWSTYLE=ON -DKWSTYLE_EXECUTABLE=/usr/local/bin/KWStyle .
 make
 make StyleCheck

Using a pre-existing ITK or VTK installation

You can configure CMake variables to use an existing ITK or VTK installation instead of its embedded versions. This is not recommended, because of inter-dependencies that require specific version of these libraries, and built using specific options, to be used.

  • USE_SYSTEM_ITK: OFF
    • If "ON", then you can tell TubeTK to use an ITK build that is already present on your system (using the CMake variable ITK_DIR).
  • USE_SYSTEM_VTK: OFF
    • If "ON", then you can tell TubeTK to use a VTK build that is already present on your system (using the CMake variable VTK_DIR). See the warning below.
  • Dependency on VTK version and build options
    • Note that TubeTK relies on VTK from 3D Slicer (https://github.com/Slicer/VTK)
    • The 3D Slicer fork of VTK contains enhancements that have not yet made it into the VTK repository itself.