Skip to content

Installation

Valentin Niess edited this page Feb 23, 2021 · 3 revisions

In order to include PUMAS in your project you simply need a copy of the files pumas.h and pumas.c. Nevertheless, hereafter are detailed instructions for building PUMAS as a standalone library, and for building the examples. Note that whatever the method used or the platform, you'll need a C99 compatible compiler, e.g. gcc on UNIX or Visual Studio on Windows.

Using make on UNIX

On UNIX you might directly use the provided Makefile. E.g., cloning the present repository:

git clone https://github.com/niess/pumas && cd pumas && make

This will build PUMAS as a shared library (in lib/libpumas.so). In addition, the examples can be built in the bin directory by further issuing make examples.

Using cmake

The toolchain for building PUMAS can also be generated using CMake with the provided CMakeLists.txt. Instructions for running cmake on Windows and UNIX platforms are provided on the CMake website. The following PUMAS specific build options are available:

BUILD_SHARED_LIBS (BOOL | TRUE)

Build PUMAS as a shared library. Set to FALSE in order to build PUMAS as a static library instead.

PUMAS_BUILD_EXAMPLES (BOOL | FALSE)

Also build the examples under bin.

PUMAS_BUILD_TEST (BOOL | FALSE)

Also build the test suite.

PUMAS_USE_GDB (BOOL | FALSE)

Enable specific options for debuging with gdb on UNIX systems.