Build instructions

The mCRL2 source code can be obtained in two ways. The source code for releases of the toolset are available as a source tarball, see Download mCRL2. The source code for the development version of the toolset is available in our Git repository hosted at Github. It can be obtained using the following command:

In the remainder of this manual, we assume that you have the source code on your system in a folder called mCRL2. We will set up an out-of-source build in mCRL2-build.


The mCRL2 toolset requires Qt and OpenGL for compilation of the graphical tools (diagraphica, ltsgraph, ltsview, lpsxsim, mcrl2-gui, mcrl2xi). If this is undesirable then building the graphical tools can be disabled using the MCRL2_ENABLE_GUI_TOOLS cmake flag.

See the platform specific instructions for Windows, MacOS and Linux. For testing see the documentation here.

Python dependencies

If you don’t want to install Python libraries system wide, you can set up a Python virtual environment (needs to be done only once) in the build directory.

$ python3 -m venv sphinx-venv

Activate it.

$ source sphinx-venv/bin/activate

Afterwards dependencies can be installed using pip as follows:

$ pip install -r <mCRL2>/requirements.txt

When using a virtual environment ensure that CMake uses the right Python binary.

$ cmake [other options]

-DPython_EXECUTABLE=absolute/path/to/sphinx-venv/bin/python <mCRL2-build>


To build the documentation we need various dependencies depending on what exact configuration is being used. First of all the cmake flag MCRL2_ENABLE_DOCUMENTATION must be enabled to build the documentation. Then the doc target can be build for a full documentation build, or fastdoc to avoid cleaning up the intermediate results. The documentation build can be fine tuned using the following cmake configuration flags.

  • MCRL2_ENABLE_DOC_DOXYGEN enables building the source code documentation using doxygen, this requires Doxygen to be installed with at least version 1.9.7.

  • MCRL2_ENABLE_DOC_PDFLATEX enables building the pdfs that are found in the library documentation, this required pdflatex to be installed with various packages.

  • MCRL2_ENABLE_DOC_MANUAL enables building the tool documentation pages, which requires the tools to be compiled.

CMake configuration flags

All three methods allow you to change the value of CMake configuration variables. Below, we describe the meaning of these variables. Note that in the graphical user interfaces, some advanced settings are initially hidden.


For a typical installation of mCRL2, the default settings are acceptable for all the options listed below. The only common change is in the path to which mCRL2 must be installed, which can be set using CMAKE_INSTALL_PREFIX.


Values of the flags are cached and are case insensitive. This implies that when changing a single value, all other flags remain the same.


Default:: Automatically detected

Specifies the path to the Boost libraries. This is normally automatically detected, but may have to be set manually when Boost was compiled manually, or when detection fails.


Default: Release

This variable controls the type of build when using a single-configuration generator like the Makefile generator. This variable has no effect for Visual Studio projects as they contain multiple-configurations.


Compile with optimisations enabled. Debug information is not generated.


Compile with extra checks, less optimisation and with generation of debug symbols.


Same as Release, except that debug information is also generated.


Historically, some extra checks were enabled in this mode. There may therefore still be differences in behaviour, compared to the Release setting.


Same as Release, but instructs the compiler to optimise for size.


Default: /usr/local/

The installation prefix for mCRL2. All mCRL2 files will be installed there.


Default: ON


Generate shared libraries, to which the executables link.


Generate static libraries, which are linked into the executables. This increases the size of executables dramatically.


Default: OFF


Compile experimental tools.


Do not compile experimental tools.


Default: OFF


Compile deprecated tools.


Do not compile deprecated tools.


Default: OFF


Enable profiling when executing tools.


Disable profiling when executing tools.


Default: OFF


Generate test targets. This option needs to be enabled in combination with BUILD_TESTING to execute library tests. If not enabled, only tool tests are executed when BUILD_TESTING is enabled.


Disable profiling when executing tools.


Default: ON


Enable generation of manual pages.


Disable generation of manual pages.


Default: ON


Compile graphical tools (diagraphica, ltsgraph, ltsview, mcrl2-gui, lpsxsim, mcrl2ide).


Do not compile graphical tools.


Default: ON


Execute tests after successful build. The tests that are exeuted are determined by the MCRL2_ENABLE_TEST_TARGETS configuration variable.


Do not execute tests.


Default: /PATH/WITH/FILE/ctags

This variable specifies the location where Ctags can be found. Ctags is a program that generates an index (or tag) file of names found in source and header files of various programming languages.


This variable specifies the location where Qt can be found.