https://github.com/ami-iit/bazel-cmake-deps-override
Helper utility to override bazel deps with CMake dependency already available in the environment.
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
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
Metadata Files
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/pixienvironment. 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_depcalls inMODULE.bazelfiles. It provides no compatibility for olderWORKSPACE-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,eigenandcatch2Bazel 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 thecondapackage{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
- Website: https://ami.iit.it/
- Repositories: 111
- Profile: https://github.com/ami-iit
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
Top Committers
| Name | 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)