alpar@5: Installation Instructions alpar@5: ========================= alpar@5: alpar@992: This file contains instructions for building and installing LEMON from alpar@992: source on Linux. The process on Windows is similar. alpar@5: alpar@992: Note that it is not necessary to install LEMON in order to use alpar@992: it. Instead, you can easily integrate it with your own code alpar@992: directly. For instructions, see alpar@992: https://lemon.cs.elte.hu/trac/lemon/wiki/HowToCompile alpar@992: kpeter@504: kpeter@318: In order to install LEMON from the extracted source tarball you have to alpar@5: issue the following commands: alpar@5: alpar@992: 1. Step into the root of the source directory. alpar@5: alpar@992: $ cd lemon-x.y.z alpar@5: alpar@992: 2. Create a build subdirectory and step into it. alpar@5: alpar@992: $ mkdir build alpar@992: $ cd build alpar@5: alpar@992: 3. Perform system checks and create the makefiles. alpar@5: alpar@992: $ cmake .. alpar@5: alpar@992: 4. Build LEMON. alpar@5: alpar@992: $ make alpar@5: alpar@992: This command compiles the non-template part of LEMON into alpar@992: libemon.a file. It also compiles the programs in the 'tools' and alpar@992: 'demo' subdirectories. alpar@992: alpar@992: 5. [Optional] Compile and run the self-tests. alpar@992: alpar@992: $ make check alpar@992: alpar@992: 5. [Optional] Generate the user documentation. alpar@992: alpar@992: $ make html alpar@992: alpar@992: The release tarballs already include the documentation. alpar@992: alpar@992: Note that for this step you need to have the following tools alpar@992: installed: Python, Doxygen, Graphviz, Ghostscript, LaTeX. alpar@992: alpar@992: 6. [Optional] Install LEMON alpar@992: alpar@992: $ make install alpar@5: ladanyi@245: This command installs LEMON under /usr/local (you will need root alpar@992: privileges to be able to do that). If you want to install it to alpar@992: some other location, then pass the alpar@992: -DCMAKE_INSTALL_PREFIX=DIRECTORY flag to cmake in Step 3. alpar@992: For example: alpar@992: alpar@992: $ cmake -DCMAKE_INSTALL_PREFIX=/home/username/lemon' alpar@5: ladanyi@245: Configure Options and Variables ladanyi@245: =============================== ladanyi@245: alpar@992: In Step 3, you can customize the build process by passing options to CMAKE. ladanyi@245: alpar@992: $ cmake [OPTIONS] .. ladanyi@245: alpar@992: You find a list of the most useful options below. alpar@5: alpar@992: -DCMAKE_INSTALL_PREFIX=PREFIX ladanyi@245: ladanyi@245: Set the installation prefix to PREFIX. By default it is /usr/local. alpar@5: alpar@992: -DCMAKE_BUILD_TYPE=[Release|Debug|Maintainer|...] ladanyi@245: alpar@992: This sets the compiler options. The choices are the following ladanyi@245: alpar@992: 'Release': A strong optimization is turned on (-O3 with gcc). This alpar@992: is the default setting and we strongly recommend using this for alpar@992: the final compilation. ladanyi@245: alpar@992: 'Debug': Optimization is turned off and debug info is added (-O0 alpar@992: -ggdb with gcc). If is recommended during the development. alpar@5: alpar@992: 'Maintainer': The same as 'Debug' but the compiler warnings are alpar@992: converted to errors (-Werror with gcc). In addition, 'make' will alpar@992: also automatically compile and execute the test codes. It is the alpar@992: best way of ensuring that LEMON codebase is clean and safe. alpar@5: alpar@992: 'RelWithDebInfo': Optimized build with debug info. alpar@5: alpar@992: 'MinSizeRel': Size optimized build (-Os with gcc) alpar@5: alpar@992: -DTEST_WITH_VALGRIND=YES alpar@5: alpar@992: Using this, the test codes will be executed using valgrind. It is a alpar@992: very effective way of identifying indexing problems and memory leaks. alpar@5: alpar@992: -DCMAKE_CXX_COMPILER=path-to-compiler alpar@5: alpar@992: Change the compiler to be used. alpar@5: alpar@992: -DBUILD_SHARED_LIBS=TRUE alpar@5: alpar@992: Build shared library instead of static one. Think twice if you alpar@992: really want to use this option. alpar@5: alpar@1064: -DLEMON_DOC_SOURCE_BROWSER=YES alpar@1064: alpar@1064: Include the browsable cross referenced LEMON source code into the alpar@1064: doc. It makes the doc quite bloated, but may be useful for alpar@1064: developing LEMON itself. alpar@1064: alpar@1064: -DLEMON_DOC_USE_MATHJAX=YES alpar@1064: alpar@1064: Use MathJax (http://mathjax.org) for rendering the math formulae in alpar@1064: the doc. It of much higher quality compared to the default LaTeX alpar@1064: generated static images and it allows copy&paste of the formulae to alpar@1064: LaTeX, Open Office, MS Word etc. documents. alpar@1064: alpar@1064: On the other hand, it needs either Internet access or a locally alpar@1064: installed version of MathJax to properly render the doc. alpar@1064: alpar@1064: -DLEMON_DOC_MATHJAX_RELPATH=DIRECTORY alpar@1064: alpar@1064: The location of the MathJax library. It defaults to alpar@1064: http://www.mathjax.org/mathjax, which necessitates Internet access alpar@1064: for proper rendering. The easiest way to make it usable offline is alpar@1064: to set this parameter to 'mathjax' and copy all files of the MathJax alpar@1064: library into the 'doc/html/mathjax' subdirectory of the build alpar@1064: location. alpar@1064: alpar@1064: See http://docs.mathjax.org/en/latest/installation.html for more details. alpar@1064: alpar@1064: alpar@1064: -DLEMON_ENABLE_GLPK=NO alpar@1064: -DLEMON_ENABLE_COIN=NO alpar@1064: -DLEMON_ENABLE_ILOG=NO alpar@1064: alpar@1064: Enable optional third party libraries. They are all enabled by default. alpar@1064: alpar@1064: -DLEMON_DEFAULT_LP=GLPK alpar@1064: alpar@1064: Sets the default LP solver backend. The supported values are alpar@1064: CPLEX, CLP and GLPK. By default, it is set to the first one which alpar@1064: is enabled and succesfully discovered. alpar@1064: alpar@1064: -DLEMON_DEFAULT_MIP=GLPK alpar@1064: alpar@1064: Sets the default MIP solver backend. The supported values are alpar@1064: CPLEX, CBC and GLPK. By default, it is set to the first one which alpar@1064: is enabled and succesfully discovered. alpar@1064: alpar@992: -DGLPK_ROOT_DIR=DIRECTORY alpar@992: -DCOIN_ROOT_DIR=DIRECTORY alpar@1062: -DILOG_ROOT_DIR=DIRECTORY alpar@5: alpar@1064: Root directory prefixes of optional third party libraries. ladanyi@824: ladanyi@824: Makefile Variables ladanyi@824: ================== ladanyi@824: alpar@992: make VERBOSE=1 ladanyi@824: alpar@992: This results in a more verbose output by showing the full alpar@992: compiler and linker commands.