Installing using CMake

Under CMake, VisIt's build system permits installation of VisIt and its dependencies using the "make install" make target. In fact, to keep this capability in working order, the old visit-bin-dist script has been deprecated in favor of "make install".


This section contains install-related information.

Installing on UNIX

CMake needs to be told at configure time where to install VisIt when you want to perform an installation. You can do this by defining CMAKE_INSTALL_PREFIX on the cmake command line. This is analogous to passing --prefix=path to an autoconf configure script. Passing CMAKE_BUILD_TYPE and setting the value to Release tells cmake to build an optimized version of VisIt.


After you build VisIt, you can use make install to install it to the specified location. You can also run make package to create a binary distribution.

Installing on MacOS X

If you plan to install VisIt on MacOS X or create a binary distribution of VisIt, you will need to set the "install name dir" to an executable-relative path. This is necessary for VisIt's installation process since it causes VisIt's components and libraries to be relinked prior to installation so they no longer contain absolute paths valid only for your computer. This relink procedure might be made part of the standard VisIt build on MacOS X but the procedure is to change the install name directories for VisIt's 3rd party dependencies at install time so doing it all at once is constistent.

cmake -DCMAKE_INSTALL_PREFIX:PATH=/Users/whitlock2/Development/CPB3/testinstall \
-DCMAKE_INSTALL_NAME_DIR:STRING=@executable_path/../lib .

After you build VisIt, you can use make install to install it to the specified location. You can also run make package to create a binary distribution.

You can find out more about the Mac-specific implementation at Mac install under CMake.

Installing 3rd party support

By default, VisIt will always install header files and libraries for VTK, Qt, Python, and Mesa. Sometimes you'll want to build database plugins that use one of VisIt's various 3rd party I/O libraries (cgns, netcdf, gdal, hdf5, and many more) against an installed version of VisIt. VisIt's build system has an option called VISIT_INSTALL_THIRD_PARTY that causes the installation and packaging process to include the 3rd party I/O library archive files and include files so they can be used to link external plugins against an installed version of VisIt.

To get this feature, you must add -DVISIT_INSTALL_THIRD_PARTY:BOOL=ON to the command line when you configure cmake. This feature should be enabled whenever you install VisIt for users on your local cluster if you plan for them to develop plugins versus the installed version of VisIt. In addition, if you produce binary distributions for the VisIt Web site, you will need to add this option.

Installing from a binary distribution

If you produced a binary distribution using make package then you can use VisIt's visit-install script to install VisIt to your system. The visit-install script puts the VisIt components in the right places and also allows you to specify certain options such as which network configuration to use or which computer bank to use by default.

Usage: visit-install [-c anl | llnl_open | llnl_closed | nersc | ornl | princeton | tacc]
                     [-g group] [-b bank] [-gw] [-l] [-dmg] [-beta | -private]
                     version platform directory

                     This will install all of its files and subdirectories
                     directly in the specified directory.
                     (So use /usr/local/visit, not /usr/local)

Example that installs VisIt 2.0.0 to /usr/local/apps/visit. This will result in the path to the visit launch script being: /usr/local/apps/visit/bin/visit. The installation structure used by VisIt permits multiple versions being installed simultaneously.

visit-install -g visit -gw 2.0.0 linux-intel /usr/local/apps/visit


The procedure for producing a binary distribution of VisIt uses the same machinery as does the "make install" process. In this case, VisIt's build system can use cpack to produce a binary distribution containing the files that would have gone into a "make install". CPack is a program related to CMake that can use the build system logic encoded into the CMakeLists.txt to decide how to package a binary distribution into a number of output formats including: tar/gz, zip, NSIS, Mac DMG, Linux RPM, etc. VisIt's build system can, by default, produce tar/gz files.

Creating a package on UNIX

All you need to do to create a tar/gz package on UNIX is execute: "make package". You should still pass some additional cmake variables to ensure that you create an optimized build, etc.

mkdir /var/tmp/testinstall
   -DCMAKE_INSTALL_PREFIX:PATH=/var/tmp/testinstall \
make package

Creating a package on MacOS X

VisIt's packaging has undergone a few iterations on the Mac. We used to not use make package when building a tar distribution file since cmake would bail out due to some long path names. So, we had a workaround for that based on make install and the tar command. More recently, we have started packaging VisIt as an application bundle.

Creating an application bundle distribution

Here is how to create a DMG file that contains VisIt as an application bundle.

mkdir /var/tmp/visit2_6_0.darwin-x86_64
   -DCMAKE_INSTALL_PREFIX:PATH=/var/tmp/visit2_6_0.darwin-x86_64 \
   -DCMAKE_INSTALL_NAME_DIR:STRING=@executable_path/../lib \
make -j 8 package

Creating a tar distribution

You will need to have configured the build system to use a relative installation name directory so VisIt's components and libraries will be relinked to have their library paths be executable relative prior to packaging.

mkdir /var/tmp/visit2_6_0.darwin-x86_64
   -DCMAKE_INSTALL_PREFIX:PATH=/var/tmp/visit2_6_0.darwin-x86_64 \
   -DCMAKE_INSTALL_NAME_DIR:STRING=@executable_path/../lib \
make install
cd /var/tmp
tar zcf visit2_6_0.darwin-x86_64.tar.gz visit2_6_0.darwin-x86_64