| 
									
										
										
										
											2012-05-15 05:14:39 +08:00
										 |  |  | Quickstart | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | In the root library folder execute: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | $] mkdir build | 
					
						
							|  |  |  | $] cd build | 
					
						
							|  |  |  | $] cmake .. | 
					
						
							|  |  |  | $] make check (optional, runs unit tests) | 
					
						
							|  |  |  | $] make install | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-15 07:35:32 +08:00
										 |  |  | Important Installation Notes | 
					
						
							|  |  |  | ---------------------------- | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-10-24 00:03:08 +08:00
										 |  |  | 1) | 
					
						
							|  |  |  | GTSAM requires the following libraries to be installed on your system: | 
					
						
							| 
									
										
										
										
											2012-05-25 04:43:22 +08:00
										 |  |  |  - BOOST version 1.43 or greater (install through Linux repositories or MacPorts) | 
					
						
							| 
									
										
										
										
											2012-05-15 07:35:32 +08:00
										 |  |  |  - Cmake version 2.6 or higher | 
					
						
							| 
									
										
										
										
											2012-05-21 00:53:07 +08:00
										 |  |  |  - Support for XCode 4.3 command line tools on Mac requires CMake 2.8.8 or higher | 
					
						
							| 
									
										
										
										
											2012-03-28 02:45:03 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-11-19 03:23:11 +08:00
										 |  |  | Optional dependent libraries: | 
					
						
							|  |  |  |  - If TBB is installed and detectable by CMake GTSAM will use it automatically. | 
					
						
							|  |  |  |    Ensure that CMake prints "Use Intel TBB : Yes".  To disable the use of TBB, | 
					
						
							|  |  |  |    disable the CMake flag GTSAM_WITH_TBB (enabled by default).  On Ubuntu, TBB | 
					
						
							|  |  |  |    may be installed from the Ubuntu repositories, and for other platforms it | 
					
						
							|  |  |  |    may be downloaded from https://www.threadingbuildingblocks.org/ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-05-06 02:42:46 +08:00
										 |  |  | Tested compilers: | 
					
						
							| 
									
										
										
										
											2014-01-31 03:42:23 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | - GCC 4.2-4.7 | 
					
						
							|  |  |  | - OSX Clang 2.9-5.0 | 
					
						
							|  |  |  | - OSX GCC 4.2 | 
					
						
							|  |  |  | - MSVC 2010, 2012 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-15 23:49:08 +08:00
										 |  |  | Tested systems: | 
					
						
							| 
									
										
										
										
											2014-01-31 03:42:23 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | - Ubuntu 11.04 - 13.10 | 
					
						
							|  |  |  | - MacOS 10.6 - 10.9 | 
					
						
							| 
									
										
										
										
											2014-05-06 02:42:46 +08:00
										 |  |  | - Windows 7, 8, 8.1 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Known issues: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | - MSVC 2013 is not yet supported because it cannot build the serialization module | 
					
						
							|  |  |  |   of Boost 1.55 (or earlier).  | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-10-24 00:03:08 +08:00
										 |  |  | 2) | 
					
						
							| 
									
										
										
										
											2012-05-15 07:35:32 +08:00
										 |  |  | GTSAM makes extensive use of debug assertions, and we highly recommend you work | 
					
						
							|  |  |  | in Debug mode while developing (enabled by default). Likewise, it is imperative | 
					
						
							|  |  |  | that you switch to release mode when running finished code and for timing. GTSAM | 
					
						
							|  |  |  | will run up to 10x faster in Release mode! See the end of this document for  | 
					
						
							|  |  |  | additional debugging tips. | 
					
						
							| 
									
										
										
										
											2011-07-16 02:26:18 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-06-02 22:35:29 +08:00
										 |  |  | 3) | 
					
						
							| 
									
										
										
										
											2012-09-03 09:45:12 +08:00
										 |  |  | GTSAM has Doxygen documentation. To generate, run 'make doc' from your | 
					
						
							|  |  |  | build directory. | 
					
						
							| 
									
										
										
										
											2009-08-22 06:23:24 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-03-28 02:45:03 +08:00
										 |  |  | 4) | 
					
						
							| 
									
										
										
										
											2012-05-15 07:35:32 +08:00
										 |  |  | The instructions below install the library to the default system install path and | 
					
						
							|  |  |  | build all components. From a terminal, starting in the root library folder,  | 
					
						
							|  |  |  | execute commands as follows for an out-of-source build: | 
					
						
							| 
									
										
										
										
											2010-07-14 03:13:07 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | $] mkdir build | 
					
						
							|  |  |  | $] cd build | 
					
						
							| 
									
										
										
										
											2012-03-28 02:45:03 +08:00
										 |  |  | $] cmake .. | 
					
						
							|  |  |  | $] make check (optional, runs unit tests) | 
					
						
							| 
									
										
										
										
											2010-07-14 03:13:07 +08:00
										 |  |  | $] make install | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-15 06:19:42 +08:00
										 |  |  | This will build the library and unit tests, run all of the unit tests,  | 
					
						
							|  |  |  | and then install the library itself. | 
					
						
							| 
									
										
										
										
											2012-03-28 02:45:03 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-15 07:35:32 +08:00
										 |  |  | - CMake Configuration Options and Details | 
					
						
							| 
									
										
										
										
											2011-10-25 11:41:40 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-15 06:19:42 +08:00
										 |  |  | GTSAM has a number of options that can be configured, which is best done with | 
					
						
							|  |  |  | one of the following: | 
					
						
							| 
									
										
										
										
											2012-03-28 02:45:03 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-15 06:19:42 +08:00
										 |  |  |   ccmake      the curses GUI for cmake | 
					
						
							|  |  |  |   cmake-gui   a real GUI for cmake | 
					
						
							| 
									
										
										
										
											2012-03-28 02:45:03 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-15 07:35:32 +08:00
										 |  |  | Important Options:  | 
					
						
							| 
									
										
										
										
											2012-03-28 02:45:03 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-15 06:19:42 +08:00
										 |  |  | CMAKE_BUILD_TYPE: We support several build configurations for GTSAM (case insensitive) | 
					
						
							|  |  |  |   Debug (default)  All error checking options on, no optimization. Use for development. | 
					
						
							|  |  |  |   Release          Optimizations turned on, no debug symbols.            | 
					
						
							|  |  |  |   Timing           Adds ENABLE_TIMING flag to provide statistics on operation  | 
					
						
							|  |  |  |   Profiling        Standard configuration for use during profiling | 
					
						
							|  |  |  |   RelWithDebInfo   Same as Release, but with the -g flag for debug symbols | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | CMAKE_INSTALL_PREFIX: The install folder. The default is typically /usr/local/ | 
					
						
							|  |  |  | To configure to install to your home directory, you could execute: | 
					
						
							| 
									
										
										
										
											2012-03-28 02:45:03 +08:00
										 |  |  | $] cmake -DCMAKE_INSTALL_PREFIX:PATH=$HOME .. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-15 06:19:42 +08:00
										 |  |  | GTSAM_TOOLBOX_INSTALL_PATH: The Matlab toolbox will be installed in a subdirectory | 
					
						
							|  |  |  | of this folder, called 'gtsam'. | 
					
						
							|  |  |  | $] cmake -DGTSAM_TOOLBOX_INSTALL_PATH:PATH=$HOME/toolbox .. | 
					
						
							| 
									
										
										
										
											2012-03-28 02:45:03 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | GTSAM_BUILD_CONVENIENCE_LIBRARIES: This is a build option to allow for tests in  | 
					
						
							|  |  |  | subfolders to be linked against convenience libraries rather than the full libgtsam.  | 
					
						
							|  |  |  | Set with the command line as follows: | 
					
						
							|  |  |  | $] cmake -DGTSAM_BUILD_CONVENIENCE_LIBRARIES:OPTION=ON .. | 
					
						
							|  |  |  |   ON (Default)   This builds convenience libraries and links tests against them. This  | 
					
						
							|  |  |  |   				 option is suggested for gtsam developers, as it is possible to build  | 
					
						
							|  |  |  |   				 and run tests without first building the rest of the library, and  | 
					
						
							|  |  |  |   				 speeds up compilation for a single test. The downside of this option  | 
					
						
							|  |  |  |   				 is that it will build the entire library again to build the full  | 
					
						
							|  |  |  |   				 libgtsam library, so build/install will be slower. | 
					
						
							|  |  |  |   OFF            This will build all of libgtsam before any of the tests, and then  | 
					
						
							|  |  |  |   				 link all of the tests at once. This option is best for users of GTSAM,  | 
					
						
							|  |  |  |   				 as it avoids rebuilding the entirety of gtsam an extra time.  | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-04 22:44:21 +08:00
										 |  |  | GTSAM_BUILD_UNSTABLE: Enable build and install for libgtsam_unstable library.  | 
					
						
							|  |  |  | Set with the command line as follows: | 
					
						
							|  |  |  | $] cmake -DGTSAM_BUILD_UNSTABLE:OPTION=ON .. | 
					
						
							|  |  |  |   ON             When enabled, libgtsam_unstable will be built and installed with the  | 
					
						
							|  |  |  |                  same options as libgtsam.  In addition, if tests are enabled, the  | 
					
						
							|  |  |  |                  unit tests will be built as well.  The Matlab toolbox will also | 
					
						
							|  |  |  |                  be generated if the matlab toolbox is enabled, installing into a  | 
					
						
							|  |  |  |                  folder called "gtsam_unstable". | 
					
						
							|  |  |  |   OFF (Default)  If disabled, no gtsam_unstable code will be included in build or install.  | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-03-28 02:45:03 +08:00
										 |  |  | Check | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-15 06:19:42 +08:00
										 |  |  | "make check" will build and run all of the tests. Note that the tests will only be  | 
					
						
							|  |  |  | built when using the "check" targets, to prevent "make install" from building the tests | 
					
						
							|  |  |  | unnecessarily. You can also run "make timing" to build all of the timing scripts.  | 
					
						
							|  |  |  | To run check on a particular module only, run "make check.[subfolder]", so to run | 
					
						
							|  |  |  | just the geometry tests, run "make check.geometry". Individual tests can be run by | 
					
						
							|  |  |  | appending ".run" to the name of the test, for example, to run testMatrix, run  | 
					
						
							| 
									
										
										
										
											2012-05-15 07:35:32 +08:00
										 |  |  | "make testMatrix.run".  | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-31 05:19:00 +08:00
										 |  |  | MEX_COMMAND: Path to the mex compiler. Defaults to assume the path is included in your  | 
					
						
							|  |  |  | shell's PATH environment variable. mex is installed with matlab at  | 
					
						
							|  |  |  | $MATLABROOT/bin/mex | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | $MATLABROOT can be found by executing the command 'matlabroot' in MATLAB | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-15 07:35:32 +08:00
										 |  |  | Debugging tips: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Another useful debugging symbol is _GLIBCXX_DEBUG, which enables debug checks | 
					
						
							|  |  |  | and safe containers in the standard C++ library and makes problems much easier | 
					
						
							|  |  |  | to find. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | NOTE:  The native Snow Leopard g++ compiler/library contains a bug that makes | 
					
						
							|  |  |  | it impossible to use _GLIBCXX_DEBUG.  MacPorts g++ compilers do work with it though. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | NOTE:  If _GLIBCXX_DEBUG is used to compile gtsam, anything that links against | 
					
						
							|  |  |  | gtsam will need to be compiled with _GLIBCXX_DEBUG as well, due to the use of | 
					
						
							|  |  |  | header-only Eigen.   |