Installation — BASIS

Installation

Prerequisites

Note

The stated package versions are the minimum versions for which it is known that BASIS is working with.

Required Packages

This section summarizes software packages which have to be installed on your system before BASIS can be build and installed from its sources.

Optional Packages

The packages named in the following table are used by BASIS only if installed on your system, and their presence is generally not required. Hence, you will be able to use the software even without these.

Build and Installation

Build Steps

The steps to build, test, and install BASIS are as follows:

  1. Extract source files.
  2. Create build directory and change to it.
  3. Run CMake to configure the build tree.
  4. Build the software using selected build tool.
  5. Test the built software.
  6. Install the built files.

On Unix-like systems with GNU Make as build tool, these build steps can be summarized by the following sequence of commands executed in a shell, where $package and $version are shell variables which represent the name of this package and the obtained version of the software.

$ tar xzf cmake-basis-$version.tar.gz
$ cd cmake-basis-$version
$ mkdir build && cd build
$ ccmake ..
  • Press ‘c’ to configure the build system and ‘e’ to ignore warnings.
  • Set CMAKE_INSTALL_PREFIX and other CMake variables and options.
  • Continue pressing ‘c’ until the option ‘g’ is available.
  • Then press ‘g’ to generate the configuration files for GNU Make.
$ make
$ make test    (optional)
$ make install (optional)

Please refer to the detailed Build and Installation How-To Guide which applies to any project developed using BASIS if you are uncertain about above steps or have problems to build, test, or install the software on your system. If this guide does not help you resolve the issue, please Report the Issue on GitHub. In case of failing tests, please attach the output of the following command:

$ ctest -V >& test.log

CMake Options

In the following, only CMake settings available to configure the build and installation of BASIS itself are documented. See CMake Options for detailed information on general CMake Options available for the build and installation of any package developed with BASIS.

-DDEPENDS_ITK_DIR:PATH

Specify directory of ITKConfig.cmake file. The ITK library is used by the basistest-driver executable if available. See Build Dependencies for more details.

-DDEPENDS_MATLAB_DIR:PATH

Specify installation root directory of MATLAB. This variable is only available if BUILD_TESTING was set to ON and setting it can be omitted. If a MATLAB installation was specified, however, the tests for the build of binaries using the MATLAB Compiler or the MEX script respectively can be run.

-DDEFAULT_TEMPLATE:PATH

Path to the directory and version of the default mad-libs style text substitution project template that will be installed with BASIS. See the Template Customization How-To for details.

-DINSTALL_TEMPLATE_DIR:BOOL

Custom installation directory for project templates.

Advanced CMake Options

Depending on which language interpreters are installed on your system, the following CMake options are available:

-DWITH_ITK:BOOLEAN

Whether to link the standalone test driver with ITK.

-DWITH_Python:BOOLEAN

Whether to build/enable the Python utilities.

-DWITH_Perl:BOOLEAN

Whether to build/enable the Perl utilities.

-DWITH_BASH:BOOLEAN

Whether to build/enable the BASH utilities.

Set up the Environment

In order to ease the execution of the main executable files, we suggest to add the path <prefix>/bin/ to the search path for executable files, i.e., the PATH environment variable. This is, however, generally not required. It only eases the execution of the command-line tools provided by the software package.

For example, if you use Bash add the following line to the ~/.bashrc file:

export PATH="<prefix>/bin:${PATH}"

Deinstallation

During the installation, a manifest of all installed files and a CMake script which reads in this list in order to remove these files again is generated and installed in <prefix>/lib/cmake/basis/.

The uninstaller is located in <prefix>/bin/ and named uninstall-basis. In order to remove all files installed by this package as well as the empty directories left behind inside the installation root directory given by <prefix>, run the command:

uninstall-basis

assuming that you added <prefix>/bin/ to your PATH environment variable.