Skip to content
Browse files

Rewrote install guide for makefiles noting the use of ccmake and cmak…

  • Loading branch information...
1 parent a58d7cb commit b8fd47ba28e4debf360cd3b7ca938d7dc5bc6fc8 @delcypher delcypher committed Oct 1, 2013
Showing with 84 additions and 4 deletions.
  1. +84 −4 INSTALL
@@ -1,14 +1,94 @@
-STP is built with [CMake](, version 2.6 or newer.
+STP is built with [CMake](, version 2.8.8 or newer.
CMake is a meta build system that generates build files for other tools such as
make(1), Visual Studio, Xcode, etc. For a list of generators supported on your
platform, consult `cmake --help`.
+Useful configuration variables
+Here are a few interesting configuration variables. These apply to all
-# Example with make(1)
+ CMAKE_BUILD_TYPE : The build type (e.g. Release)
+ CMAKE_INSTALL_PREFIX : The prefix for install (e.g. /usr/local )
+ BUILD_SHARED_LIBS : Build shared libraries rather than static
+ SANITIZE : Use Clang's sanitization checks
+ TUNE_NATIVE : Tune compilation to native architecture
+Quick start
+To build STP run
mkdir build && cd build
- cmake -G 'Unix Makefiles' ..
+ cmake -G 'Unix Makefiles' /path/to/stp/source/root
+ make
+If you'd prefer a more in-depth explaination of how to configure, build
+and install STP read on...
+Build directory
+CMake supports building in and out of source. It is recommended that
+you build out of source. For example in a directory outside of the
+STP root source directory run
+ mkdir build
+The simplest thing you can do is use the default configuration by running
+ cd build/
+ cmake -G 'Unix Makefiles' /path/to/stp/source/root
+You can easily tweak the build configuration in several ways
+* Run `cmake-gui /path/to/stp/source/root` instead of `cmake`. This
+ user interface lets you control the value of various configuration
+ variables and lets you pick the build system generator.
+* Run `ccmake` instead of `cmake`. This provides an ncurses terminal
+ interface for changing configuration variables.
+* Pass "-D<VARIABLE>=<VALUE>" options to `cmake` (not very user friendly).
+ It is probably best if you **only** configure this way if you are writing
+ scripts.
+You can also tweak configuration later by running
+ make edit_cache
+Then edit any configuration variables, reconfigure and then regenerate the
+build system.
+Build and install
+After configuration you can build by running
-In subsequent builds, only the `make` command is required.
+Remember you can use the `-j<n>` flag to significantly to decrease build
+time by running `<n>` jobs in parallel (e.g. `make -j4`).
+Installation (optional) can be done by running
+ make install
+and files can be uninstalled by running
+ make uninstall
+The root of installation is controlled by the CMAKE_INSTALL_PREFIX variable
+at configure time. Remember you can easily change this at anytime by running
+ make edit_cache
+and editing the value of CMAKE_INSTALL_PREFIX.
+Visual Studio

0 comments on commit b8fd47b

Please sign in to comment.
Something went wrong with that request. Please try again.