Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pytorch/cpuinfo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVertexwahn <julian.amann@tum.de>2022-03-26 04:15:08 +0300
committerGitHub <noreply@github.com>2022-03-26 04:15:08 +0300
commitb40bae27785787b6dd70788986fd96434cf90ae2 (patch)
tree2093c4183aed90bde52bdc55cfbcd2e83458967d /README.md
parentba0f4a216de3060ac50ff881be9ef436213c45b5 (diff)
Add support for Bazel build system (#81)
Diffstat (limited to 'README.md')
-rw-r--r--README.md32
1 files changed, 31 insertions, 1 deletions
diff --git a/README.md b/README.md
index 7866fd6..d3da46e 100644
--- a/README.md
+++ b/README.md
@@ -48,7 +48,7 @@ Detect if target is a 32-bit or 64-bit ARM system:
#endif
```
-Check if the host CPU support ARM NEON
+Check if the host CPU supports ARM NEON
```c
cpuinfo_initialize();
@@ -151,6 +151,36 @@ executable(
)
```
+### Bazel
+
+This project can be built using [Bazel](https://bazel.build/install).
+
+You can also use this library as a dependency to your Bazel project. Add to the `WORKSPACE` file:
+
+```python
+load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
+
+git_repository(
+ name = "org_pytorch_cpuinfo",
+ branch = "master",
+ remote = "https://github.com/Vertexwahn/cpuinfo.git",
+)
+```
+
+And to your `BUILD` file:
+
+```python
+cc_binary(
+ name = "cpuinfo_test",
+ srcs = [
+ # ...
+ ],
+ deps = [
+ "@org_pytorch_cpuinfo//:cpuinfo",
+ ],
+)
+```
+
### CMake
To use with CMake use the [FindPkgConfig](https://cmake.org/cmake/help/latest/module/FindPkgConfig.html) module. Here is an example: