Installation

An explanation on how to install continuable on various platforms.

Requirements

Continuable requires a fairly new toolchain and was verified to work with following compilers:

  • Visual Studio 2017+ Update 2
  • Clang 5.0+
  • GCC 6.0+

Although the build is observed with the listed compilers earlier versions might work.

Dependencies

Continuable is a header-only library with one required header-only dependency:

Additionally GTest is required as optional dependency for the asynchronous unit testing macros defined in continuable/support/gtest.hpp if those are used:

  • google/googletest is used as unit testing framework and to provide asynchronous testing macros.

For the examples and unit tests there might be more dependencies used, which are fetched through git submodules.

Installation

Making continuable available inside your project is possible through various ways.

Through CMake

The continuable build is driven by CMake and the project exposes CMake interface targets when being used by external projects:

add_subdirectory(continuable)
# continuable provides an interface target which makes it's
# headers available to all projects using the continuable library.
target_link_libraries(my_project continuable)

When adding the continuable subdirectory as git submodule this should work out of the box.

git submodule add https://github.com/Naios/continuable.git

Additionally the CMake project exports a continuable target which is importable through the find_package CMake command when installed:

mkdir build
cd build
cmake ..
cmake --build . --target INSTALL --config Release

In your CMakeLists.txt:

find_package(continuable REQUIRED)

Through package managers

Continuable is present in some package managers and registries already, and might be installed from there.

By using the amalgamation header

For major versions there is an amalgamation header provided which can be included without any dependency:

By copying the headers

If you don't want to rely on CMake or package managers it is possible to copy and include the include directories of continuable and Naios/function2 into your project.

As an improvement git submodules could be used:

git submodule add https://github.com/Naios/continuable.git
git submodule add https://github.com/Naios/function2.git

Building the unit tests

In order to build the unit tests clone the repository recursively with all submodules:

# Shell:
git clone --recursive https://github.com/Naios/continuable.git

Then CMake can be used to generate a project solution for testing.