Editing Building from SVN

From BRL-CAD

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
*****  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 ==
 +
 
 +
For Linux/Mac/BSD:
 +
<pre>svn checkout https://svn.code.sf.net/p/brlcad/code/brlcad/trunk brlcad</pre>
  
== Obtain the sources via Subversion ==
+
Note: If you do not yet have an SVN client installed, go to http://subversion.tigris.org 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.
  
 
For Windows:
 
For Windows:
Line 8: Line 11:
  
 
To get a checkout after installing TortoiseSVN, right-click in a folder where you want to download the sources, select SVN Checkout and specify https://svn.code.sf.net/p/brlcad/code/brlcad/trunk for the repository URL.
 
To get a checkout after installing TortoiseSVN, right-click in a folder where you want to download the sources, select SVN Checkout and specify https://svn.code.sf.net/p/brlcad/code/brlcad/trunk for the repository URL.
 
For Linux/Mac/BSD:
 
<pre>svn checkout https://svn.code.sf.net/p/brlcad/code/brlcad/trunk brlcad</pre>
 
 
Note: If you do not yet have an SVN client installed, go to http://subversion.tigris.org 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 ==  
 
== Configure the build system with CMake ==  
Line 19: Line 17:
  
 
Once installed, create a directory where you will compile BRL-CAD and run CMake.
 
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:[[File:Running_cmake_on_windows.png|200px|thumb|right|Running CMake GUI on Windows]]
 
  
 
For Linux/Mac/BSD, this looks like:
 
For Linux/Mac/BSD, this looks like:
Line 29: Line 25:
 
  cmake .. (for a default build)
 
  cmake .. (for a default build)
 
  cmake .. -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release (for a release build)
 
  cmake .. -DBRLCAD_BUNDLED_LIBS=ON -DCMAKE_BUILD_TYPE=Release (for a release build)
 +
 +
For Windows, you can use the CMake GUI where you specify build and source directories:[[File:Running_cmake_on_windows.png|200px|thumb|right|Running CMake GUI on Windows]]
  
 
== Compile and test your build ==
 
== Compile and test your build ==
 
On Windows, simply open the "BRLCAD" solution and Compile.
 
  
 
On Linux/Mac/BSD, run this in your build directory:
 
On Linux/Mac/BSD, run this in your build directory:
Line 38: Line 34:
 
  make
 
  make
  
If there are no compilation errors, you can test via:
+
At this point, you should have a fully installed and working system. You can test things by doing:
  
 
  make test
 
  make test
 
You can also run a performance test:
 
 
 
  make benchmark
 
  make benchmark
  
 
Both the test and benchmark should report successfully if everything is working correctly. Report any failures to the BRL-CAD [http://sourceforge.net/tracker/?group_id=105292&atid=640802 bug tracker].
 
Both the test and benchmark should report successfully if everything is working correctly. Report any failures to the BRL-CAD [http://sourceforge.net/tracker/?group_id=105292&atid=640802 bug tracker].
  
 +
On Windows, open the BRLCAD solution and Compile.
  
 
== Doxygen (OPTIONAL) ==
 
== Doxygen (OPTIONAL) ==
 
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.
 
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):
+
To build the HTML files on a UNIX system, run (from your build directory)
  
 
  make dox
 
  make dox
Line 66: Line 60:
 
== Setup environment (OPTIONAL) ==
 
== Setup environment (OPTIONAL) ==
  
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.
+
At this point, everything should be ready for use. If the default prefix of /usr/brlcad was used or if the corresponding symbolic links were created, users should only need to add /usr/brlcad/bin to their PATH in order to find binaries for the package (optionally setting their MANPATH as well):
 
 
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:
 
For bash:
  
  export PATH="/usr/brlcad/bin:$PATH"
+
  export PATH=/usr/brlcad/bin:$PATH
  export MANPATH="/usr/brlcad/man:$MANPATH"
+
  export MANPATH=/usr/brlcad/man:$MANPATH
  
 
For csh/tcsh:
 
For csh/tcsh:
  
 
  set path=( /usr/brlcad/bin $path )
 
  set path=( /usr/brlcad/bin $path )
  setenv MANPATH "/usr/brlcd/man:$MANPATH"
+
  setenv MANPATH /usr/brlcd/man:$MANPATH
 
  rehash
 
  rehash
  
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).
+
If users do not want to modify their PATH, they can get by providing the full path to the binaries (e.g. /usr/brlcad/bin/mged). To find BRL-CAD manual pages without setting your MANPATH, use the provided "brlman" binary instead of "man".
  
 +
== Test your Build ==
  
== Test your Build ==
+
If compilation went well, there should now be more than 400 command-line applications at your disposal for processing images and geometry. A quick test of functionality (and performance) is to run the BRL-CAD benchmark if you're not on Windows:
 +
 
 +
benchmark
  
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:
+
Regardless, you should be able to run the main modeling application:
  
 
  mged
 
  mged

Please note that all contributions to BRL-CAD may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see BRL-CAD:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)