|
OpenABF 2.1.0
|
OpenABF can be installed through CMake or by manually copying the header file(s) into your include directory. This page outlines the various installation options.
This project can be configured and installed using the CMake build system:
This will install the OpenABF header(s) to your system include path and provide an easy method for including OpenABF inside your own CMake project:
Note: For best performance, configure your CMake project with the -DCMAKE_BUILD_TYPE=Release flag.
The OpenABF CMake project provides a number of flags for configuring the installation:
OPENABF_MULTIHEADER: Install the multi-header version of OpenABF (Default: OFF)OPENABF_BUILD_EXAMPLES: Build example applications. (Default: OFF)OPENABF_BUILD_TESTS: Build project unit tests. This will download and build the Google Test framework. (Default: OFF)OPENABF_BUILD_DOCS: Build documentation. Dependencies: Doxygen, Graphviz (optional). Unavailable if Doxygen is not found. (Default: OFF)Another option for providing OpenABF to your project is by using CMake's FetchContent module:
This downloads the OpenABF source code and adds it to your CMake project as a subproject. Link it against your targets as you would any library added with find_package:
Copy and paste the contents of single_include/ to your project or include path. As OpenABF depends upon the Eigen library, you will also need to add the Eigen headers to your include path:
Note: For best performance, compile your application with the -DNDEBUG -03 preprocessor definitions.
For many legacy reasons, the Microsoft Visual C++ compiler (MSVC) is not automatically conformant with the C++ standard in all cases. This may lead to the following issues when compiling against OpenABF.
Note: As this project only supports C++17 and up, you should always compile with at least /std:c++17.
At the time of this writing, MSVC does not automatically recognize the alternative boolean operators and, or, and not. There are multiple ways to fix this issue.
/permissive- flag: This flag enables C++ language conformance for the entire compilation. This is currently Microsoft's suggested method for enabling the alternative operators, and is added by default when creating new projects in Visual Studio 2017 version 15.5 and later (but not when using MSVC on the command line). Since the /permissive- flag enables strict C++ conformance for the entire project (it enables much more than just operator support), it may lead to other compilation problems in existing code. See the flag documentation to decide if this is the right solution for your project.iso646.h: This header file provides definitions for the alternative operators and should be included before including OpenABF. This was Microsoft's previous recommendation for enabling alternative operator support. It may have fewer side effects in existing code bases than the /permissive- flag.