Building from SVN

Revision as of 15:35, 3 July 2021 by JaredMcLaughlin (talk | contribs) (Warn people that SVN may stop working at some point in the future.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
          • BRL-CAD Recently moved from SVN to Github. Building from SVN works as of 3 Jul 2021, but you may need to build from Github in the future. ***

Obtain the sources via Subversion[edit]

For Windows:

Install a Subversion client for Windows, such as TortoiseSVN:

To get a checkout after installing TortoiseSVN, right-click in a folder where you want to download the sources, select SVN Checkout and specify for the repository URL.

For Linux/Mac/BSD:

svn checkout brlcad

Note: If you do not yet have an SVN client installed, go to for information on obtaining an appropriate SVN client for your platform. Most modern Linux/BSD/UNIX distributions will also have SVN available in their package repositories.

Configure the build system with CMake[edit]

BRL-CAD also requires the build tool CMake. Most Linux/BSD/UNIX systems provide a package for CMake. For platforms that do not, CMake is available from

Once installed, create a directory where you will compile BRL-CAD and run CMake.

For Windows, you can use the CMake GUI where you specify build and source directories:

Running CMake GUI on Windows

For Linux/Mac/BSD, this looks like:

cd brlcad
mkdir build
cd build
cmake .. (for a default build)
cmake .. -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release (for a release build)

Compile and test your build[edit]

On Windows, simply open the "BRLCAD" solution and Compile.

On Linux/Mac/BSD, run this in your build directory:


If there are no compilation errors, you can test via:

make test

You can also run a performance test:

make benchmark

Both the test and benchmark should report successfully if everything is working correctly. Report any failures to the BRL-CAD bug tracker.

Doxygen (OPTIONAL)[edit]

If you have doxygen installed somewhere CMake can find it, then you can build a browsable HTML documentation of the source code. This is useful if you want to use BRL-CAD's libraries directly, or if you just want a better overview of how things are structured.

To build the HTML files on a Linux/Mac/BSD system, run (from your build directory):

make dox

and then open doc/doxygen_output/html/index.xhtml with your web browser of choice.

Install (OPTIONAL)[edit]

On all systems, you can simply run directly from the build directory without installing.

That said, by default BRL-CAD installs into /usr/brlcad or /opt/brlcad on Linux/Mac/BSD and into the standard program directory on Windows. To check your build or install of BRL-CAD, browse to the "bin" directory from the GUI or from cmd.exe and run "mged".

Setup environment (OPTIONAL)[edit]

At this point, all that remains is setting your system PATH environment variable so BRL-CAD utilities can be found. Installation does not set PATH for you automatically.

For Windows, setting PATH can be helpful but isn't necessary. Simply navigate to where you installed BRL-CAD and run from there.

For Linux/Mac/BSD, you'll either need to specify full paths to applications (e.g., /usr/brlcad/bin/rt) or set your PATH. If the default installation prefix (/usr/brlcad or /opt/brlcad) was used, you should only need to add /usr/brlcad/bin to your PATH in order to find applications (optionally setting MANPATH as well):

For bash:

export PATH="/usr/brlcad/bin:$PATH"
export MANPATH="/usr/brlcad/man:$MANPATH"

For csh/tcsh:

set path=( /usr/brlcad/bin $path )
setenv MANPATH "/usr/brlcd/man:$MANPATH"

To find BRL-CAD manual pages without setting your MANPATH, use the provided "brlman" binary instead of "man" (e.g., /usr/brlcad/bin/brlman rt).

Test your Build[edit]

If compilation went well, there should now be more than 400 command-line applications at your disposal for processing images and geometry. You should be able to run the main modeling application:


If you didn't install, you may need to specify the path to the tool (e.g., "bin/mged") from the build directory.