COIN-OR::LEMON - Graph Library

source: lemon/INSTALL @ 1148:78434a448b5e

Last change on this file since 1148:78434a448b5e was 1148:78434a448b5e, checked in by Alpar Juttner <alpar@…>, 8 years ago

Update INSTALL to use CMAKE. Also update AUTHORS and LICENSE

File size: 3.3 KB
Line 
1Installation Instructions
2=========================
3
4This file contains instructions for building and installing LEMON from
5source on Linux. The process on Windows is similar.
6
7Note that it is not necessary to install LEMON in order to use
8it. Instead, you can easily integrate it with your own code
9directly. For instructions, see
10https://lemon.cs.elte.hu/trac/lemon/wiki/HowToCompile
11
12
13In order to install LEMON from the extracted source tarball you have to
14issue the following commands:
15
16   1. Step into the root of the source directory.
17
18      $ cd lemon-x.y.z
19
20   2. Create a build subdirectory and step into it.
21
22      $ mkdir build
23      $ cd build
24
25   3. Perform system checks and create the makefiles.
26
27      $ cmake ..
28
29   4. Build LEMON.
30
31      $ make
32
33      This command compiles the non-template part of LEMON into
34      libemon.a file. It also compiles the programs in the 'tools' and
35      'demo' subdirectories.
36
37   5. [Optional] Compile and run the self-tests.
38
39      $ make check
40
41   5. [Optional] Generate the user documentation.
42
43      $ make html
44
45      The release tarballs already include the documentation.
46
47      Note that for this step you need to have the following tools
48      installed: Python, Doxygen, Graphviz, Ghostscript, LaTeX.
49
50   6. [Optional] Install LEMON
51
52      $ make install
53
54      This command installs LEMON under /usr/local (you will need root
55      privileges to be able to do that). If you want to install it to
56      some other location, then pass the
57      -DCMAKE_INSTALL_PREFIX=DIRECTORY flag to cmake in Step 3.
58      For example:
59     
60      $ cmake -DCMAKE_INSTALL_PREFIX=/home/username/lemon'
61
62Configure Options and Variables
63===============================
64
65In Step 3, you can customize the build process by passing options to CMAKE.
66
67$ cmake [OPTIONS] ..
68
69You find a list of the most useful options below.
70
71-DCMAKE_INSTALL_PREFIX=PREFIX
72
73  Set the installation prefix to PREFIX. By default it is /usr/local.
74
75-DCMAKE_BUILD_TYPE=[Release|Debug|Maintainer|...]
76
77  This sets the compiler options. The choices are the following
78
79  'Release': A strong optimization is turned on (-O3 with gcc). This
80    is the default setting and we strongly recommend using this for
81    the final compilation.
82
83  'Debug': Optimization is turned off and debug info is added (-O0
84    -ggdb with gcc). If is recommended during the development.
85
86  'Maintainer': The same as 'Debug' but the compiler warnings are
87    converted to errors (-Werror with gcc). In addition, 'make' will
88    also automatically compile and execute the test codes. It is the
89    best way of ensuring that LEMON codebase is clean and safe.
90
91  'RelWithDebInfo': Optimized build with debug info.
92
93  'MinSizeRel': Size optimized build (-Os with gcc)
94
95-DTEST_WITH_VALGRIND=YES
96
97  Using this, the test codes will be executed using valgrind. It is a
98  very effective way of identifying indexing problems and memory leaks.
99
100-DCMAKE_CXX_COMPILER=path-to-compiler
101
102  Change the compiler to be used.
103
104-DBUILD_SHARED_LIBS=TRUE
105
106  Build shared library instead of static one. Think twice if you
107  really want to use this option.
108
109-DGLPK_ROOT_DIR=DIRECTORY
110-DCOIN_ROOT_DIR=DIRECTORY
111-DCPLEX_ROOT_DIR=DIRECTORY
112
113  Install root directory prefixes of optional third party libraries.
114
115Makefile Variables
116==================
117
118make VERBOSE=1
119
120   This results in a more verbose output by showing the full
121   compiler and linker commands.
Note: See TracBrowser for help on using the repository browser.