diff options
author | Vertexwahn <julian.amann@tum.de> | 2022-03-26 04:15:08 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-26 04:15:08 +0300 |
commit | b40bae27785787b6dd70788986fd96434cf90ae2 (patch) | |
tree | 2093c4183aed90bde52bdc55cfbcd2e83458967d /README.md | |
parent | ba0f4a216de3060ac50ff881be9ef436213c45b5 (diff) |
Add support for Bazel build system (#81)
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 32 |
1 files changed, 31 insertions, 1 deletions
@@ -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: |