bazelbuild / bazelbuild/examples

how to include new_repository headers

Open
#250 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
957
Forks
578
Avg merge
3d 22h
Merged PRs (30d)
1

Description

how to include ONEAPI_HEADERS in BUILD file ?

my bazel source file as follow:

ref.bzl

```
ONEAPI_HEADERS = glob([ "include/**",])
ONEAPI_LIBRARY = glob([ "lib/*",])
cc_import(
name = "oneAPI",
hdrs = ONEAPI_HEADERS,
shared_library = "lib/libsycl.so",
visibility = ["//visibility:public"],)
```

BUILD.

```
cc_binary(
name = "starter",
srcs = [
"getting_started.cpp",
"example_utils.hpp"
],
deps = [
"@oneDNN//:oneDNN",
"@oneAPI//:oneAPI"
],
copts = [
"-I/home/wzy/sycl_workspace/oneDNN-cuda-debug/include",
"-I/home/wzy/sycl_workspace/build-cuda/include",
"-I/home/wzy/sycl_workspace/build-cuda/include/sycl", ],

linkstatic = 0)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.