Minimal contracts library
Minimal contracts library tries to offer a minimal library-only solution to support contracts in
modern C++.
The library offers:
Please, refer to library API description for more details.
The following requirements must be met to use the library:
If you want to run the unit tests you will need:
Clone the project:
git clone git@github.com:jdgarciauc3m/min-contracts.git
To build the library out of source, create a directory and run cmake
:
mkdir build
cd build
cmake .. -D_CMAKE_BUILD_TYPE=Release # Configure build process
make
You can install the library with the target install
.
make install
Unit tests can be disabled by setting the option mincontracts_TESTS
to OFF
.
To run the tests, simply use CTest, from the build directory, passing the desired
configuration.
ctest
If you want more verbose output for the tests, you can use:
ctest -VV
Some ideas used here are inspired by the great series of blog posts by Herb Sutter: