This repository hosts code for generating the command line executables and documentation resources for the Fluid Corpus Manipulation Project. Much of the actual code that does the exciting stuff lives in this repository's principal dependency, the Fluid Corpus Manipulation Library.
- A wrapper from our code that allows us to generate command-line executables from a generic class.
- Stubs for producing an executable for each 'client' in the Fluid Corpus Manipulation Library.
- CMake code for managing dependencies, building and packaging.
- CMake >= 3.11
- A C++ 14 compliant compiler for macOS or Windows (via XCode tools on macOS; Visual Studio 17 >= 15.9 on Windows; GCC or clang on Linux)
These will be downloaded and configured automatically, unless you pass CMake a source code location on disk for each (see below):
...and you already have a development environment set up, understand CMake? And Python 3 + DocUtils + Jinja + PyYAML if you want docs?
Cool:
mkdir -p build && cd build
cmake -DDOCS=<ON/OFF(default)> ..
make install
This will assemble a package in release-packaging.
An alternative to setting up / running CMake directly on the command line is to install the CMake GUI, or use to use the curses GUI ccmake.
Also, with CMake you have a choice of which build system you use.
- The default on macOS and Linux is
Unix Makefiles. On macOS you can also use Xcode by passing-GXcodeto CMake when you first run it. - The default on Windows is the latest version of Visual Studio installed. However, Visual Studio can open CMake files directly as projects, which has some upsides. When used this way, CMake variables have to be set via a JSON file that MSVC will use to configure CMake.
Alternatively, flucoma-cli is now on the AUR / Arch User Repository and can now be compiled and downloaded by executing:
yay -S flucoma-cli-giton Arch Linux and Manjaro (with thanks to @madskjeldgaard)
There is an html manual associated with each of the command-line programs. This documentation partially relies on a system that is shared with other wrappers of the Fluid Corpus Manipulation Project for different creative coding environments.
Pre-requisites:
- Python 3
- Docutils python package (ReST parsing)
- Jinja python package (template engine)
- PyYAML >= 5.1 (YAML parsing)
To generate html documentation for the executables requires a further dependency, flucoma-docs, which we use to combine generated and human-written docs. We then pass DOCS=ON to CMake
cmake -DDOCS=ON ..
Unless we pass the location on disk of flucoma-docs, CMake will again take care of downloading this dependency.
This process:
- has only ever been tested on Mac, so may well not work at all on Windows
- can sometimes produce spurious warnings in Xcode, but should work
In some cases you may want to use your own copies of the required libraries. Unless specified, the build system will download these automatically. To bypass this behaviour, use the following cache variables:
FLUID_PATH: location of the Fluid Corpus Manipulation LibraryFLUID_PARAMDUMP_PATH: location offlucoma_paramdumprepository (e.g. for debugging documentation generation)EIGEN_PATHlocation of the Eigen libraryHISS_PATHlocation of the HISSTools library
For example, use this to us your own copy of the Fluid Corpus Manipulation Library
cmake -DFLUID_PATH=<location of Fluid Corpus Manipulation Library> ..
To find out which branches / tags / commits of these we use, look in the top level CMakeLists.txt of the Fluid Corpus Manipulation Library for the FetchContent_Declare statements for each dependency.
The build system generally assumes an x86 cpu with AVX instructions (most modern x86 CPUs). To build on another kind of CPU (e.g. older than 2012) you can use the FLUID_ARCH cache variable to pass specific flags to your compiler. For example use -DFLUID_ARCH=-mcpu=native to optimize for your particular CPU.
Owen Green, Gerard Roma, Pierre Alexandre Tremblay
Alex Harker, Francesco Cameli
This project has received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme (grant agreement No 725899).