xo-flatstring: docs: + source code link + tweaks

This commit is contained in:
Roland Conybeare 2024-04-17 10:56:47 -04:00
commit 5b9fc80258

View file

@ -3,24 +3,46 @@
.. toctree
:maxdepth: 2
Install
=======
Source
======
`xo-flatstring source`_ lives on github.
Source code lives on github `here`_
.. _xo-flatstring source: https://github.com/rconybea/xo-flatstring
.. _here: https://github.com/rconybea/xo-flatstring
Implementation relies on c++20 features (for example class-instances as template arguments).
Tested with gcc 13.2
Include as submodule
--------------------
To clone from git:
.. code-block:: bash
cd myproject
git submodule add -b main https://github.com/rconybea/xo-flatstring ext/xo-flatstring
git submodule update --init
git clone https://github.com/rconybea/xo-flatstring
Implementation relies on c++20 features (expanded use of constexpr; class-instances as template arguments).
Tested with gcc 13.2
Install
=======
Since xo-flatstring is header-only, can incorporate into another project just by copying the include directories
to somewhere convenient.
Copy includes
-------------
.. code-block:: bash
# For example..
cd myproject
mkdir -p ext/xo-flatstring
rsync -a -v path/to/xo-flatstring/include/ ext/xo-flatstring/
Include as git submodule
------------------------
.. code-block:: bash
cd myproject
git submodule add -b main https://github.com/rconybea/xo-flatstring ext/xo-flatstring
git submodule update --init
This assumes you organize directly-incorporated dependencies under directory ``myproject/ext``.
You would then add ``myproject/ext/xo-flatstring/include`` to your compiler's include path,
@ -28,7 +50,7 @@ and from c++ do something like
.. code-block:: c++
#include <xo/flatstring/flatstring.hpp>
#include <xo/flatstring/flatstring.hpp>
in c++ source files that rely on xo-flatstring
@ -54,3 +76,11 @@ Unit test dependencies:
.. _catch2: https://github.com/catchorg/Catch2
.. _xo-cmake: https://github.com/rconybea/xo-cmake
.. _xo-indentlog: https://github.com/rconybea/indentlog
To build documentation, will also need:
* `doxygen`
* `graphviz`
* `sphinx`
* `breathe`
* `sphinx_rtd_theme`