Building

A guide on how to build GPDS.

Downloading

The best way to download GPDS is by cloning the official repository.

  1. Clone the repository:
    $> git clone https://github.com/simulton/gpds
  2. Get all submodules:
    $> cd gpds
    $> git submodule update --init --recursive

Building

GPDS comes with cmake integration which allows to build the library (static and shared), examples and unit tests.

Targets

The following cmake targets are interesting to a user:

gpds-static
Build gpds as a static library.
gpds-shared
Build gpds as a shared/dynamic library.
gpds-tests
Build (and run) the unit tests.
gpds-examples
Build the example application(s) that showcase how to use GPDS.

Build static library

Build GPDS as a static library.

  1. Create a build directory:
    $> mkdir build
    $> cd build
  2. Generate the configuration and build
    $> cmake ..
    $> make gpds-static
    A static library of GPDS is available under /build/src/ in form of libgpds.a (or equivalent).

Build shared/dynamic library

Build GPDS as a shared/dynamic library.

  1. Create a build directory:
    $> mkdir build
    $> cd build
  2. Generate the configuration and build:
    $> cmake ..
    $> make gpds-shared
    A shared/dynamic library of GPDS is available under /build/src/ in form of libgpds.so, libgpds.dll (or equivalent).

Build unit tests

Build and run unit tests.

  1. Create a build directory:
    $> mkdir build
    $> cd build
  2. Generate the configuration and build:
    $> cd build
    $> cmake ..
    $> make gpds-test
    An executable that runs unittests of GPDS is available under /build/test/ in form of gpds-test.exe (or equivalent).
  3. Run the unit tests
    $> build/tests/gpds-test
    The application performs the unit tests and reports back the results.

Build examples

Build and run the example application(s).

  1. Create a build directory:
    $> mkdir build
    $> cd build
  2. Generate the configuration and build:
    $> cd build
    $> cmake ..
    $> make gpds-example
    An executable that runs the example(s) of GPDS is available under /build/examples/ in form of gpds-example.exe (or equivalent).
  3. Run the example(s)
    $> build/examples/basic/gpds-example
    The example application(s) are being executed.