-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathINSTALL
94 lines (64 loc) · 2.6 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
STP is built with [CMake](http://cmake.org/), 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
generators.
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
Makefile
=========
Quick start
-----------
To build STP run
mkdir build && cd build
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
Configuration
-------------
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
make
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
============
TODO