Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CMake Build System File Generator Support #94

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

coder3101
Copy link
Contributor

@coder3101 coder3101 commented Jul 15, 2020

CMake is a widely used Build System Files Generator. This PR adds the support for CMake into 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)

Configuration Controls

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.

Control the targets to build

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.

Build Tensor and Benchmarks

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.

coder3101 and others added 5 commits July 1, 2020 12:58
Old uBLAS will only use Travis and Appveyor from old legacy CI while
Tensor is now build using modern Github Action on wide array of compiler
and standards and codes.
@codecov
Copy link

codecov bot commented Jul 15, 2020

Codecov Report

Merging #94 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop      #94   +/-   ##
========================================
  Coverage    95.33%   95.33%           
========================================
  Files           22       22           
  Lines         1223     1223           
========================================
  Hits          1166     1166           
  Misses          57       57           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7cc02bf...e2d9ab0. Read the comment docs.

@coder3101 coder3101 marked this pull request as ready for review July 24, 2020 11:23
@coder3101 coder3101 changed the title Add CMake Build Generator System Support Add CMake Build System File Generator Support Jul 25, 2020
@bassoy bassoy mentioned this pull request Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant