mirror of
https://github.com/Naios/continuable.git
synced 2025-12-06 08:46:44 +08:00
202 lines
16 KiB
HTML
202 lines
16 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
|
|
|
|
<meta charset="UTF-8" />
|
|
<title>Installation | Continuable</title>
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"/>
|
|
<link rel="stylesheet" href="m-dark+doxygen.compiled.css" />
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"/>
|
|
<link rel="stylesheet" href="base.css" />
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"/>
|
|
<link rel="stylesheet" href="terminal.css" />
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"/>
|
|
<link rel="stylesheet" href="atom-one-dark.css" />
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<meta name="theme-color" content="#23373B" />
|
|
</head>
|
|
<body>
|
|
<header><nav id="navigation">
|
|
<div class="m-container">
|
|
<div class="m-row">
|
|
<a href="index.html" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">Continuable <span class="m-thin">4.1.0</span></a>
|
|
<div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
|
|
<a href="#search" class="m-dox-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
|
|
<path d="m6 0c-3.3144 0-6 2.6856-6 6 0 3.3144 2.6856 6 6 6 1.4858 0 2.8463-0.54083 3.8945-1.4355-0.0164 0.33797 0.14734 0.75854 0.5 1.1504l3.2227 3.7891c0.55185 0.6139 1.4517 0.66544 2.002 0.11524 0.55022-0.55022 0.49866-1.4501-0.11524-2.002l-3.7891-3.2246c-0.39184-0.35266-0.81242-0.51469-1.1504-0.5 0.89472-1.0482 1.4355-2.4088 1.4355-3.8945 0-3.3128-2.6856-5.998-6-5.998zm0 1.5625a4.4375 4.4375 0 0 1 4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375-4.4375 4.4375 4.4375 0 0 1 4.4375-4.4375z"/>
|
|
</svg></a>
|
|
<a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
|
|
<a id="m-navbar-hide" href="#" title="Hide navigation"></a>
|
|
</div>
|
|
<div id="m-navbar-collapse" class="m-col-t-12 m-show-m m-col-m-none m-right-m">
|
|
<div class="m-row">
|
|
<ol class="m-col-t-6 m-col-m-none">
|
|
<li>
|
|
<a href="tutorial.html">Tutorial</a>
|
|
<ol>
|
|
<li><a href="tutorial-creating-continuables.html">Creating continuables</a></li>
|
|
<li><a href="tutorial-chaining-continuables.html">Chaining continuables</a></li>
|
|
<li><a href="tutorial-connecting-continuables.html">Connecting continuables</a></li>
|
|
<li><a href="tutorial-transforming-continuables.html">Transforming continuables</a></li>
|
|
<li><a href="tutorial-awaiting-continuables.html">Awaiting continuables</a></li>
|
|
<li><a href="tutorial-promisify-continuables.html">Promisify functions</a></li>
|
|
</ol>
|
|
</li>
|
|
<li>
|
|
<a href="pages.html">Pages</a>
|
|
<ol>
|
|
<li><a href="installation.html" id="m-navbar-current">Installation</a></li>
|
|
<li><a href="tutorial.html">Tutorial</a></li>
|
|
<li><a href="configuration.html">Configuration</a></li>
|
|
<li><a href="changelog.html">Changelog</a></li>
|
|
</ol>
|
|
</li>
|
|
<li>
|
|
<a href="modules.html">Modules</a>
|
|
<ol>
|
|
<li><a href="group___base.html">Base</a></li>
|
|
<li><a href="group___connections.html">Connections</a></li>
|
|
<li><a href="group___promisify.html">Promisify</a></li>
|
|
<li><a href="group___testing.html">Testing</a></li>
|
|
<li><a href="group___types.html">Types</a></li>
|
|
<li><a href="group___transforms.html">Transforms</a></li>
|
|
<li><a href="group___traversal.html">Traversal</a></li>
|
|
</ol>
|
|
</li>
|
|
</ol>
|
|
<ol class="m-col-t-6 m-col-m-none" start="4">
|
|
<li>
|
|
<a href="namespacecti.html">cti</a>
|
|
<ol>
|
|
<li><a href="namespacecti_1_1transforms.html">cti::transforms</a></li>
|
|
<li><a href="classcti_1_1continuable__base.html">cti::continuable_base</a></li>
|
|
<li><a href="classcti_1_1promise__base.html">cti::promise_base</a></li>
|
|
</ol>
|
|
</li>
|
|
<li class="m-show-m"><a href="#search" class="m-dox-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
|
|
<path d="m6 0c-3.3144 0-6 2.6856-6 6 0 3.3144 2.6856 6 6 6 1.4858 0 2.8463-0.54083 3.8945-1.4355-0.0164 0.33797 0.14734 0.75854 0.5 1.1504l3.2227 3.7891c0.55185 0.6139 1.4517 0.66544 2.002 0.11524 0.55022-0.55022 0.49866-1.4501-0.11524-2.002l-3.7891-3.2246c-0.39184-0.35266-0.81242-0.51469-1.1504-0.5 0.89472-1.0482 1.4355-2.4088 1.4355-3.8945 0-3.3128-2.6856-5.998-6-5.998zm0 1.5625a4.4375 4.4375 0 0 1 4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375 4.4375 4.4375 4.4375 0 0 1-4.4375-4.4375 4.4375 4.4375 0 0 1 4.4375-4.4375z"/>
|
|
</svg> Search</a></li>
|
|
</ol>
|
|
<ol class="m-col-t-6 m-col-m-none">
|
|
<li>
|
|
<a href="https://github.com/Naios/continuable" aria-label="View source on Github"><i class="fa fa-github"></i> Code</a>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav></header>
|
|
<main><article>
|
|
<div class="m-container m-container-inflatable">
|
|
<div class="m-row">
|
|
<div class="m-col-l-10 m-push-l-1">
|
|
<h1>
|
|
Installation
|
|
</h1>
|
|
|
|
<p>An explanation on how to install continuable on various platforms.</p>
|
|
<div class="m-block m-default">
|
|
<h3>Contents</h3>
|
|
<ul>
|
|
<li><a href="#installation-requirements">Requirements</a></li>
|
|
<li><a href="#installation-dependencies">Dependencies</a></li>
|
|
<li>
|
|
<a href="#installation-installation">Installation</a>
|
|
<ul>
|
|
<li><a href="#installation-installation-cmake">Through CMake</a></li>
|
|
<li><a href="#installation-installation-pkg">Through package managers</a></li>
|
|
<li><a href="#installation-installation-amalgamation">By using the amalgamation header</a></li>
|
|
<li><a href="#installation-installation-copy">By copying the headers</a></li>
|
|
|
|
</ul>
|
|
</li>
|
|
<li><a href="#installation-unit-tests">Building the unit tests</a></li>
|
|
</ul>
|
|
</div>
|
|
<section id="installation-requirements"><h2><a href="#installation-requirements">Requirements</a></h2><p>Continuable requires a fairly new toolchain and was verified to work with following compilers:</p><ul><li>Visual Studio 2017+ Update 2</li><li>Clang 5.0+</li><li>GCC 6.0+</li></ul><p>Although the build is observed with the listed compilers earlier versions might work.</p><aside class="m-note m-danger"><h4>Warning</h4><p>GCC is proven to be slower than Clang in template compilation and thus it is suggested to use Clang instead.</p></aside></section><section id="installation-dependencies"><h2><a href="#installation-dependencies">Dependencies</a></h2><p>Continuable is a header-only library with one required header-only dependency:</p><ul><li><a href="https://github.com/Naios/function2">Naios/<wbr />function2</a> is used as type erasure wrapper to convert a <a href="classcti_1_1continuable__base.html" class="m-dox">continuable_<wbr />base</a> into a <a href="group___types.html#ga95d2328ba27fe194491b52073b58be50" class="m-dox">continuable</a>.</li></ul><p>Additionally GTest is required as optional dependency for the asynchronous unit testing macros defined in <code>continuable/support/gtest.hpp</code> if those are used:</p><ul><li><a href="https://github.com/google/googletest">google/<wbr />googletest</a> is used as unit testing framework and to provide asynchronous testing macros.</li></ul><p>For the examples and unit tests there might be more dependencies used, which are fetched through git submodules.</p><aside class="m-note m-info"><h4>Note</h4><p>The library only depends on the standard library when following headers are used:</p><ul><li><code><a href="continuable-base_8hpp.html" class="m-dox">continuable/<wbr />continuable-base.hpp</a></code></li><li><code><a href="continuable-promise-base_8hpp.html" class="m-dox">continuable/<wbr />continuable-promise-base.hpp</a></code></li><li><code><a href="continuable-connections_8hpp.html" class="m-dox">continuable/<wbr />continuable-connections.hpp</a></code></li><li><code><a href="continuable-promisify_8hpp.html" class="m-dox">continuable/<wbr />continuable-promisify.hpp</a></code></li><li><code><a href="continuable-transforms_8hpp.html" class="m-dox">continuable/<wbr />continuable-transforms.hpp</a></code></li></ul></aside></section><section id="installation-installation"><h2><a href="#installation-installation">Installation</a></h2><p>Making continuable available inside your project is possible through various ways.</p><section id="installation-installation-cmake"><h3><a href="#installation-installation-cmake">Through CMake</a></h3><p>The continuable build is driven by CMake and the project exposes CMake interface targets when being used by external projects:</p><pre class="m-code"><span class="nb">add_subdirectory</span><span class="p">(</span><span class="s">continuable</span><span class="p">)</span>
|
|
<span class="c"># continuable provides an interface target which makes it's</span>
|
|
<span class="c"># headers available to all projects using the continuable library.</span>
|
|
<span class="nb">target_link_libraries</span><span class="p">(</span><span class="s">my_project</span> <span class="s">continuable</span><span class="p">)</span></pre><p>When adding the continuable subdirectory as git submodule this should work out of the box.</p><pre class="m-code">git submodule add https://github.com/Naios/continuable.git</pre><aside class="m-note m-warning"><h4>Attention</h4><p>On POSIX platforms you are required to link your application against a corresponding thread library, otherwise <code>std::futures</code> won't work properly, this is done automatically by the provided CMake project.</p></aside><p>Additionally the CMake project exports a <code>continuable</code> target which is importable through the <code class="m-code"><span class="err">find_package</span></code> CMake command when installed:</p><pre class="m-code">mkdir build
|
|
<span class="nb">cd</span> build
|
|
cmake ..
|
|
cmake --build . --target INSTALL --config Release</pre><p>In your <code>CMakeLists.txt</code>:</p><pre class="m-code"><span class="nb">find_package</span><span class="p">(</span><span class="s">continuable</span> <span class="s">REQUIRED</span><span class="p">)</span></pre></section><section id="installation-installation-pkg"><h3><a href="#installation-installation-pkg">Through package managers</a></h3><p>Continuable is present in some package managers and registries already, and might be installed from there.</p><aside class="m-note m-warning"><h4>Attention</h4><p>The project is still looking for contributions that would help to make it available from various package managers in order to make the installation easier.</p></aside></section><section id="installation-installation-amalgamation"><h3><a href="#installation-installation-amalgamation">By using the amalgamation header</a></h3><p>For major versions there is an amalgamation header provided which can be included without any dependency:</p><ul><li><a href="https://gist.githubusercontent.com/Naios/25d731aa4707d35a9bcec507f3cb9038/raw/051d2ea07b6704893c7fc9844e8d1c105c6821e0/continuable.hpp">4.0.0</a></li><li><a href="https://gist.githubusercontent.com/Naios/b128ab5028a7eb33e4285c0293573d9f/raw/79fe332964a786b21a8661ef65d07a5669260a3c/continuable.hpp">3.0.0</a></li></ul></section><section id="installation-installation-copy"><h3><a href="#installation-installation-copy">By copying the headers</a></h3><p>If you don't want to rely on CMake or package managers it is possible to copy and include the <code>include</code> directories of continuable and <a href="https://github.com/Naios/function2">Naios/<wbr />function2</a> into your project.</p><p>As an improvement git submodules could be used:</p><pre class="m-code">git submodule add https://github.com/Naios/continuable.git
|
|
git submodule add https://github.com/Naios/function2.git</pre></section></section><section id="installation-unit-tests"><h2><a href="#installation-unit-tests">Building the unit tests</a></h2><p>In order to build the unit tests clone the repository recursively with all submodules:</p><pre class="m-code"><span class="c1"># Shell:</span>
|
|
git clone --recursive https://github.com/Naios/continuable.git</pre><p>Then CMake can be used to generate a project solution for testing.</p></section>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</article></main>
|
|
<div class="m-dox-search" id="search">
|
|
<a href="#!" onclick="return hideSearch()"></a>
|
|
<div class="m-container">
|
|
<div class="m-row">
|
|
<div class="m-col-m-8 m-push-m-2">
|
|
<div class="m-dox-search-header m-text m-small">
|
|
<div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
|
|
<div id="search-symbolcount">…</div>
|
|
</div>
|
|
<div class="m-dox-search-content">
|
|
<form>
|
|
<input type="search" name="q" id="search-input" placeholder="Loading …" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
|
|
</form>
|
|
<noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
|
|
<div id="search-help" class="m-text m-dim m-text-center">
|
|
<p class="m-noindent">Search for symbols, directories, files, pages or
|
|
modules. You can omit any prefix from the symbol or file path; adding a
|
|
<code>:</code> or <code>/</code> suffix lists all members of given symbol or
|
|
directory.</p>
|
|
<p class="m-noindent">Use <span class="m-label m-dim">↓</span>
|
|
/ <span class="m-label m-dim">↑</span> to navigate through the list,
|
|
<span class="m-label m-dim">Enter</span> to go.
|
|
<span class="m-label m-dim">Tab</span> autocompletes common prefix, you can
|
|
copy a link to the result using <span class="m-label m-dim">⌘</span>
|
|
<span class="m-label m-dim">L</span> while <span class="m-label m-dim">⌘</span>
|
|
<span class="m-label m-dim">M</span> produces a Markdown link.</p>
|
|
|
|
</div>
|
|
<div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
|
|
<ul id="search-results"></ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script src="search.js"></script>
|
|
<script src="searchdata.js" async="async"></script>
|
|
<footer><nav>
|
|
<div class="m-container">
|
|
<div class="m-row">
|
|
<div class="m-col-l-10 m-push-l-1">
|
|
<b><a
|
|
href="https://github.com/Naios/continuable">continuable</a></b>
|
|
-
|
|
C++14
|
|
allocation
|
|
aware
|
|
futures</br>Copyright
|
|
2015–2020
|
|
<a
|
|
href="https://github.com/Naios">Denis
|
|
Blank</a>.
|
|
Contact
|
|
the
|
|
author
|
|
via
|
|
<a
|
|
href="mailto:denis.blank@outlook.com">e-mail</a>.</br>Powered
|
|
by
|
|
<a
|
|
href="http://doxygen.org/">Doxygen</a>
|
|
and
|
|
<a
|
|
href="http://mcss.mosra.cz/">m.css</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav></footer>
|
|
</body>
|
|
</html>
|