Building Dripline¶
Dripline is typically built either in the Standalone configuration, or as a Submodule.
For either build option, a number of build options can be used to customize the build.
Build Options¶
Dripline build options include:
Dripline_BUILD_EXAMPLES(BOOL)¶if ON, builds the example applications
Dripline_BUILD_PYTHON(BOOL)¶if ON, builds utilities used by the Python wrapping (Dripline python wrapping is done in Dripline-python)
Dripline_ENABLE_EXECUTABLES(BOOL)¶if ON, builds the Dripline executables
Dripline_ENABLE_TESTING(BOOL)¶if ON, builds the testing application
Dripline_MAX_PAYLOAD_SIZE(INT)¶Maximum payload size in bytes
Dripline_PYTHON_THROW_REPLY_KEYWORD¶keyword used by the python wrapping that indicates that the thrown object is a reply message to be sent
From the built-in CMake options, users may be interested in adjusting the build type to control the level of compiler optimization and terminal output. The CMake option and possible values are:
CMAKE_BUILD_TYPE(STRING: [Debug || Release])¶Debugprints info and debug messages, and can print trace messages; low compiler optimization; debugging symbols included
Releaseonly prints warning and error messages; highly optimized, and no debugging symbols included
Standalone Option¶
In standalone mode, one compiles only the dripline-cpp repository and its dependencies. This option is best for testing, providing access to command-line tools, or when a derrived software product uses dripline-cpp as an external dependency. This is the approach used in the Dockerfile, which is included in the dripline-cpp repository and used to automatically build dripline-cpp container images. Dripline-python’s recommended build also expects dripline-cpp as an external dependency. The steps are:
Clone the repository:
git clone https://github.com/driplineorg/dripline-cpp --recurse-submodules
Create a build directory:
cd dripline-cpp mkdir build cd build
Run CMake:
cmake ..
Build and install:
make install
Submodule Option¶
The submodule build configuration is for when the dripline-cpp is being include as a git submodule in some derived package’s repository. This option is best when you want to track and pin the exact dripline-cpp version to be used in another project and you want to build them together using cmake. The steps for this mode are:
Go to the top-level directory of the parent pacakge in which you want to include dripline-cpp:
cd /path/to/my_package
Add the submodule:
git submodule add https://github.com/driplineorg/dripline-cpp [desired path]
Set the desired dripline build options from the parent package’s CMakeLists.txt file.