Previous: Building with autoconf/automake, Up: Configuring and compiling avldb


3.3.2 Building with cmake

    3.3.2.1 Configuration

    From your object directory, run `cmake ../PATH-TO-UNPACKED-SOURCES'

              $ cmake ../avldb
    

    Probably you want to specify an install prefix:

              $ cmake ../avldb -DCMAKE_INSTALL_PREFIX=<prefix>
    

    Where <prefix> can be /usr, /usr/local, /opt, etc. The default is /opt/ps .

    Note the install prefix is automatically searched for required libraries and header files, so if you install librt, libz and glib2 to the same prefix most configuration options are unnecessary ( or if header files and libraries can be found in standart system paths e.g. `/usr/include` and `/usr/lib*` on Unix-like system ) .

  1. List of recognized cmake variables (cmake -DOption)
    CMAKE_INSTALL_PREFIX
    install prefix - default "/opt/ps"
    AVLDB_SHARED
    build shared libraries - default ON
    AVLDB_STATIC
    uild static libraries - default ON
    AVLDB_TESTS
    build avldb tests - default ON
    AVLDB_HUGE_INTERVAL_BLOCK
    use inflatable interval tree" - default OFF

    Alternatively you can set/change cmake variables by :

    $ ccmake ../avldb

  2. Compilation

    To build the library and related programs, type `make'. This will produce a lot of output, some of which may look like errors from `make' but isn't. Look for error messages from `make' containing `***'. Those indicate that something is seriously wrong.

    If you want to run a parallel make, simply pass the `-j' option with an appropriate numeric parameter to `make'. You need a recent GNU `make' version, though.

    Basic test programs (located in tests subdirectory) are build as default. See chapter `Running tests' for more informations.

  3. Instalation

    To install the library and its header files, and the Info files of the manual, type `sudo make install' or run `make install' as root.