-
Notifications
You must be signed in to change notification settings - Fork 2
CMake Support
CMake is a widely used Build System Files Generator. This PR adds the support for CMake to Boost.uBLAS. As a result following things can be built with CMake
- Examples
- Benchmarks (Requires Boost.PROGRAM_OPTIONS)
- Tensor Tests (Requires Boost.UNIT_TEST_FRAMEWORK)
In order to build with CMake, you need to have either Boost installed or boost headers build from source using b2 headers
. You can pass an option to CMake -DBOOST_HEADERS_DIR=<path_to_boost_headers>
and ublas will use those headers. If you skip this option, CMake will try to find a system installed Boost and use its include directories. If both of the above fails, CMake will fail and no build system files will be generated.
By default, CMake will build system files for all of the above three (examples, test, benchmarks). If you want to quickly test something or want to build some specific targets. You can use the following flags:
$ cmake .. -DBUILD_TENSOR_TEST=OFF # It Will not build tensor unit tests
$ cmake .. -DBUILD_EXAMPLES=ON # It Will build examples. (By default it will build all but if you disable any target once, you need to explicitly enable it again. We use cache to remember your last runs configurations)
$ cmake .. -DBUILD_BENCHMARKS=OFF # It Will not build benchmarks, You will need to pass ON next time to again enable it.
b2 headers
only collects the header files. This is not sufficient to build Tensor examples or Benchmarks as they need to be linked against Boost.Test Framework and Boost.ProgramOptions. Regardless of whether you use a custom Boost header directory or let CMake find it. You will need installed boost to link against those libraries.
I thank our mentor Cem for his constant support and help in achieving our goals. We always find him helpful and he was always easy to reach for help or discussion regarding the work. We would also like to thank Google for the Google Summer of Code Programme, without which all these wouldn't be possible. Lastly, we express our gratitude to our parents for helping and providing us with all resources to carrying out our work nicely from our homes.
- Project Proposal
- Milestones and Tasks
- Implementation
- cpp20
- github-actions
- features/tidy
- features/format
- features/cmake
- Documentation
- Pull Requests
- Future Work