Skip to content

Configuring and Building DREAM.3D on Linux


These prerequisites need to be completed before configuring and building DREAM.3D.

If you have already fulfilled all of these prerequisites, skip to the Setting Up DREAM.3D for CMake Configuration section.

Install a Compiler Suite

A compatible compiler needs to be installed on your system to be able to build DREAM.3D.

For more information, please visit Installing a Compiler Suite (external link).

Install the DREAM.3D SDK

Developers of DREAM.3D must use the Superbuild build system to install a DREAM.3D SDK.

For more information, please visit Making an SDK.

Setting Up DREAM.3D for CMake Configuration

Once the SDK is installed, a file with the name DREAM3D_SDK.cmake can be found in the DREAM3D_SDK directory at /opt/DREAM3D_SDK/DREAM3D_SDK.cmake. This file defines all the installed locations for all of the dependent libraries.

Note: If you use a package library to install all the dependencies, you must substitute the appropriate paths instead of reusing the DREAM3D_SDK_ROOT variable.

Checking Paths of Dependencies

Open the DREAM3D_SDK.cmake file in the DREAM3D_SDK folder. Check that the path to every dependency is set correctly. For example, the paths to Qt, HDF5, Boost, Qwt, and others may be written incorrectly and may need to be updated to whatever path each one is located at on the file system.


  1. Open CMake and set the Where is the source code path to /home/[YOUR-HOME-FOLDER]/Workspace/DREAM3D.

  2. Set the Where to build the binaries path to /home/[YOUR-HOME-FOLDER]/Workspace/Builds/DREAM3D-Build/Debug.

  3. We are going to create a CMake variable. Press the Add Entry button.

  4. Set the Name to DREAM3D_SDK. Set the Type to PATH and set the Value to /opt/DREAM3D_SDK

  5. You should now have one variable, DREAM3D_SDK.

  6. Press the Configure button in CMake.

  7. Set the generator to be compatible with whatever method you'll be using to work with DREAM.3D. For example: For command line use, set it to Unix Makefiles or, if installed, Ninja. Any generator can be used for command line, but these are the recommended ones.

    Make sure Use default native compilers is checked.

  8. When the configuration is finished, make sure that CMAKE_BUILD_TYPE is set to Debug.

  9. Press the Configure button in CMake again. You may need to click Configure a few times until all the red highlights are gone.

  10. Press the Generate button in CMake to generate the build files.

  11. Repeat steps 1-10, except use path /home/[YOUR-HOME-FOLDER]/Workspace/Builds/DREAM3D-Build/Release for step 2 and set CMAKE_BUILD_TYPE to Release in step 9.

Using the Command Line (Advanced Users Only)

Navigate to the DREAM3D directory, make a build directory, and navigate into your newly created build directory. Configure DREAM.3D.

[user] $ cd DREAM3D
[user] $ mkdir ../DREAM3D-Build && cd ../DREAM3D-Build

Building DREAM.3D

Once you have configured DREAM.3D, simply build DREAM.3D in your preferred IDE, or open the Terminal app and build DREAM.3D without an IDE.

Next Page: Creating a Filter

Previous Page: Making an SDK