sparrow 0.9.0
|
Here we describe how to build the project for development purposes on Linux or macOS. For Windows, the instructions are similar.
List of CMake options:
ACTIVATE_LINTER
: Create targets to run clang-format (default: OFF)ACTIVATE_LINTER_DURING_COMPILATION
: Run linter during the compilation (default: OFF), requires ACTIVATE_LINTER
to be ONBUILD_DOCS
: Build the documentation (default: OFF)BUILD_EXAMPLES
: Build the examples (default: OFF)BUILD_TESTS
: Build the tests (default: OFF)ENABLE_COVERAGE
: Enable coverage reporting (default: OFF)ENABLE_INTEGRATION_TEST
: Enable integration tests (default: OFF)SPARROW_BUILD_SHARED
: Build sparrow as a shared library (default: ON)SPARROW_CONTRACTS_THROW_ON_FAILURE
: Throw exceptions instead of aborting on contract failures (default: OFF)USE_DATE_POLYFILL
: Use date polyfill implementation (default: ON)USE_LARGE_INT_PLACEHOLDERS
: Use types without API for big integers, ON by default on 32-bit systems and MSVC compilers (default: ON on 32-bit systems and MSVC, OFF otherwise)USE_SANITIZER
: Enable sanitizer(s). Options are: address;leak;memory;thread;undefined (default: empty)First, we create a conda environment with all required development dependencies:
Then we activate the environment:
Create a build directory and run cmake from it:
And finally, build the project:
If you prefer to use VCPKG, you can follow these steps: First, install the required dependencies using VCPKG:
Then, run the cmake configuration:
If you prefer to use Conan, you can follow these steps: First, install the required dependencies using Conan:
Available Conan options:
use_date_polyfill
: Use date polyfill implementation (default: False)build_tests
: Build the tests (default: False)generate_documentation
: Generate documentation (default: False)Then, run the cmake configuration:
To run the tests, the easy way is to use the cmake targets:
run_tests
: Runs all tests without JUnit reportrun_tests_with_junit_report
: Runs all tests and generates a JUnit report in the test-reports
directoryrun_integration_tests
: Runs the integration testsrun_integration_tests_with_junit_report
: Runs the integration tests and generates a JUnit report in the test-reports
directoryTo run all examples:
To build the documentation, you can use the docs
target:
The documentation will be located in the docs/html
folder in the build directory. You can open docs/html/index.html
in your browser to view it. ```
The documentation will be located in the docs/html
folder in the build directory. You can open docs/html/index.html
in your browser to view it.