https://github.com/stephane-caron/bazel_qpmad
Bazel workspace rules to build qpmad targets
https://github.com/stephane-caron/bazel_qpmad
Last synced: 30 days ago
JSON representation
Bazel workspace rules to build qpmad targets
- Host: GitHub
- URL: https://github.com/stephane-caron/bazel_qpmad
- Owner: stephane-caron
- License: apache-2.0
- Created: 2023-01-03T16:16:33.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-18T10:29:01.000Z (6 months ago)
- Last Synced: 2025-04-30T05:45:39.906Z (30 days ago)
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bazel rules for qpmad
Workspace rules for building C++ targets that depend [qpmad](https://github.com/asherikov/qpmad).
## Setup
Add the following to your ``WORKSPACE`` file:
```python
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")http_archive(
name = "bazel_qpmad",
url = "https://github.com/stephane-caron/bazel_qpmad/archive/refs/tags/v1.3.0.tar.gz",
sha256 = "9104a1e67df14dbf0c44f68621b648275051786de44e031c978ad561e5bf9c27",
strip_prefix = "bazel_qpmad-1.3.0",
)load("@bazel_qpmad//tools/workspace:default.bzl", add_bazel_qpmad = "add_default_repositories")
# This creates the @eigen and @qpmad dependencies
add_bazel_qpmad()
```You can then build C++ targets that depend on ``@qpmad``:
```python
cc_binary(
name = "demo",
srcs = ["demo.cpp"],
deps = ["@qpmad"],
)
```## Example
From this repository, run:
```console
./tools/bazelisk run //examples:demo
```This example should output:
```
x = 1 2 3 4 -0.71875 -0.71875 -0.71875 -0.71875 -0.71875 -0.71875 -0.71875 -0.71875 -0.71875 -0.71875 -0.71875 -0.71875 -0.71875 -0.71875 -0.71875 -0.71875
```