An open API service indexing awesome lists of open source software.

https://github.com/ibob/doctest-lib

A CMake wrapper of https://github.com/doctest/doctest/ to make life easier
https://github.com/ibob/doctest-lib

Last synced: over 1 year ago
JSON representation

A CMake wrapper of https://github.com/doctest/doctest/ to make life easier

Awesome Lists containing this project

README

          

# doctest-lib

A wrapper of the awesome C++ unit-testing library **[doctest](https://github.com/doctest/doctest/)**.

It makes using the library as a submodule with CMake a bit easier.

It has a `CMakeLists.txt` which is supposed to be added by `add_subdirectory` and defines the following targets:

* `doctest::headers` or `doctest-headers` - a header-only interface library, in case you want to add the implementation in your own files
* `doctest::doctest` or `doctest` - a static library with no main function, in case you want to write your own
* `doctest::main` or `doctest-main` - a static library which defines a main function and is the common way of using doctest

To use doctest with this helper: `#include `

For the header-only use include the implementation with `#include `

With this you don't have to define your own file with a doctest implementation and it doesn't impose any compiler or linker settings whatsoever on the caller.

## Copying

The files in `doctest/parts` are copied from [doctest/doctest](https://github.com/doctest/doctest/) and are under the [MIT Software License](http://opensource.org/licenses/MIT). Copyright © 2016-2021 Viktor Kirilov

Everything else is simple boilerplate which I release in the public domain.