Skip to content

Latest commit

 

History

History
66 lines (42 loc) · 1.4 KB

setup.rst

File metadata and controls

66 lines (42 loc) · 1.4 KB

Setup

Prerequisites

The library is supported on Linux, macOS, FreeBSD, and Windows.

The following compilers are supported to compile both the library and the tests:

  • GCC 4.9+ (Can be relaxed to GCC 4.6+ when not using C++)
  • Clang 3.4+
  • MSVC 14+ (Included in Visual Studio 2015 or later)

Building from source

First, install dependencies:

  • C/C++ compiler
  • Meson, Ninja
  • CMake (for subprojects)
  • pkg-config
  • libffi (libffi-dev)
  • libgit2 (libgit2-dev)

Other runtime dependencies will be bundled if they are not available on the system (BoxFort, debugbreak, klib, nanomsg, nanopb).

Clone this repository:

$ git clone https://github.com/Snaipe/Criterion.git

Then, run the following commands to build Criterion:

Installing the library and language files (Linux, macOS, FreeBSD) ----------------------------------------------------------------

Run with an elevated shell:

$ meson install -C build

On Linux systems, update the dynamic linker runtime bindings:

$ ldconfig

Usage

To compile your tests with Criterion, you need to make sure to:

  1. Add the include directory to the header search path
  2. Install the library to your library search path
  3. Link Criterion to your executable.

This should be all you need.