https://github.com/ami-iit/bazel-cmake-deps-override

Helper utility to override bazel deps with CMake dependency already available in the environment.

https://github.com/ami-iit/bazel-cmake-deps-override

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.2%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

Helper utility to override bazel deps with CMake dependency already available in the environment.

Basic Info
  • Host: GitHub
  • Owner: ami-iit
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: main
  • Size: 13.7 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 2
  • Releases: 0
Created over 1 year ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

bazel-cmake-deps-override

Helper utility to override bazel deps with CMake dependency already available in the environment.

This is an extremely preliminary piece of software, that will probably not work in your case. Anyhow, in the following there are some instructions on how to use it.

Install

This is a unreleased and experimental pure-Python package. If you do not know how to install it in your environment, you are probably not among the target users.

Usage

[!WARNING] At the moment the project works only if the CMake packages are installed as part of a conda/pixi environment. If that is not the case, the script will not be able to work.

[!WARNING] If you use pre-compiled libraries in bazel, you can't anymore assume that they are ABI compatible as you are compiling all of them from source with the same compiler. You need to make sure that all the used pre-compiled libraries and the compilation options you are using in your project are ABI compatible.

[!WARNING] The script is only compatible with Bazel dependencies described with bazel_dep calls in MODULE.bazel files. It provides no compatibility for older WORKSPACE-based bazel workflows.

bazel-cmake-deps-override is useful if you want to build a bazel C++ project, but you want that some C++ dependencies are not re-compiled by bazel, but instead you want it to use the library already installed in your environment, and you want to get the information on the installed libraries via the CMake config files and CMake imported targets.

To use it, navigate to the root of the bazel project you want to build, and run bazel-cmake-deps-override followed by the list of Bazel modules that you want to override for using CMake imported targets. The script will generate all its file in the build-cmake-deps-override folder, and then you can tell bazel to use them by passing the --bazelrc=./bazel-cmake-deps-overrides/bazelrc argument before any command.

Example:

~~~bash cd rootfolderofbazelproject bazel-cmake-deps-override osqp eigen catch2 bazel --bazelrc=./bazel-cmake-deps-overrides/bazelrc test //... ~~~

[!WARNING] Warning: at the moment the correct CMake and conda metadata is only provided for osqp, eigen and catch2 Bazel modules. For any other module called {bazel_module}, the script just assumes that there is a CMake package called {bazel_module}, that defines a single imported target {bazel_module}::{bazel_module}, and that is contained in the conda package {bazel_module}. The plan is to make this metadata information configurable via a config file.

FAQs

Q: Why are you using an external Python script, instead of doing this inside bazel itself? A: I have no idea how to do that inside bazel itself, if you have any suggestion feel free to open an issue!

Owner

  • Name: Artificial and Mechanical Intelligence
  • Login: ami-iit
  • Kind: organization
  • Location: Italy

GitHub Events

Total
  • Issues event: 2
  • Delete event: 1
  • Push event: 2
  • Pull request event: 1
  • Create event: 1
Last Year
  • Issues event: 2
  • Delete event: 1
  • Push event: 2
  • Pull request event: 1
  • Create event: 1

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 2
  • Total Committers: 1
  • Avg Commits per committer: 2.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 2
  • Committers: 1
  • Avg Commits per committer: 2.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Silvio Traversaro s****o@t****t 2
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 2
  • Total pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 minute
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 minute
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • traversaro (2)
Pull Request Authors
  • traversaro (2)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

pyproject.toml pypi
setup.py pypi