-
Notifications
You must be signed in to change notification settings - Fork 591
[email protected] #6221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[email protected] #6221
Changes from 1 commit
4ee2ee0
12eb640
5dedb6a
886a9ad
93f4c32
6cdfdce
a2818de
a481719
010a7b8
c25008f
1829b6c
8773ef2
0090b02
d57c444
0539c0c
e97d6aa
44eccf8
9fe927f
5bfe189
504fbfd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| """muda""" | ||
|
|
||
| module( | ||
| name = "dylib", | ||
| version = "2.2.1", | ||
| compatibility_level = 1, | ||
| ) | ||
|
|
||
| bazel_dep(name = "rules_cc", version = "0.2.8") | ||
| bazel_dep(name = "platforms", version = "1.0.0") | ||
| bazel_dep(name = "googletest", version = "1.17.0", dev_dependency = True) | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,42 @@ | ||||||
| --- /dev/null | ||||||
| +++ BUILD.bazel | ||||||
| @@ -0,0 +1,39 @@ | ||||||
| +load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test") | ||||||
| + | ||||||
| +cc_library( | ||||||
| + name = "dylib", | ||||||
| + hdrs = ["include/dylib.hpp"], | ||||||
| + copts = ["-std=c++11"], | ||||||
| + includes = ["include"], | ||||||
| + linkopts = select({ | ||||||
| + "@platforms//os:linux": ["-ldl"], | ||||||
| + "//conditions:default": [], | ||||||
| + }), | ||||||
| + visibility = ["//visibility:public"], | ||||||
| +) | ||||||
| + | ||||||
| + | ||||||
| +# Example usage and tests | ||||||
| +cc_binary( | ||||||
| + name = "dynamic_lib", | ||||||
|
||||||
| + srcs = ["tests/lib.cpp"], | ||||||
| + copts = [ | ||||||
| + "-std=c++17", | ||||||
| + "-fPIC", | ||||||
| + ], | ||||||
| + linkshared = True, | ||||||
| + visibility = ["//visibility:private"], | ||||||
| +) | ||||||
| + | ||||||
| +cc_test( | ||||||
| + name = "unit_tests", | ||||||
| + srcs = ["tests/tests.cpp"], | ||||||
| + copts = ["-std=c++17"], | ||||||
| + data = [":dynamic_lib"], | ||||||
| + visibility = ["//visibility:private"], | ||||||
| + deps = [ | ||||||
| + ":dylib", | ||||||
| + "@googletest//:gtest", | ||||||
| + "@googletest//:gtest_main", | ||||||
|
||||||
| build_flags: | |
| - '--process_headers_in_dependencies' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| --- MODULE.bazel | ||
| +++ MODULE.bazel | ||
| @@ -0,0 +1,11 @@ | ||
| +"""muda""" | ||
| + | ||
| +module( | ||
| + name = "dylib", | ||
| + version = "2.2.1", | ||
| + compatibility_level = 1, | ||
| +) | ||
| + | ||
| +bazel_dep(name = "rules_cc", version = "0.2.8") | ||
| +bazel_dep(name = "platforms", version = "1.0.0") | ||
| +bazel_dep(name = "googletest", version = "1.17.0", dev_dependency = True) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| matrix: | ||
| platform: | ||
| - ubuntu2204 | ||
| - windows | ||
| bazel: [8.x] | ||
|
|
||
| tasks: | ||
| verify_targets: | ||
| name: Verify build targets | ||
| platform: ${{ platform }} | ||
| bazel: ${{ bazel }} | ||
| build_targets: | ||
| - '@dylib//:dylib' | ||
| test_targets: | ||
| - '@dylib//:unit_tests' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "url": "https://github.com/martin-olivier/dylib/archive/refs/tags/v2.2.1.tar.gz", | ||
| "integrity": "sha256-avDSqRhgdD3J9WS6CrfwNqmzfJBDlWECiHkVcdTb6ls=", | ||
| "strip_prefix": "dylib-2.2.1", | ||
| "patches": { | ||
| "add_build_file.patch": "sha256-RLbSXWuisVCgbVMK2pbmTUYV++8+s4AKxl2MHHcuLIo=", | ||
| "module_dot_bazel.patch": "sha256-PGediE7WWitufUHz6LogWxZBB407mL3BIu/3va0m5Ik=" | ||
| }, | ||
| "patch_strip": 0 | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "homepage": "https://github.com/martin-olivier/dylib", | ||
| "maintainers": [ | ||
| { | ||
| "email": "[email protected]", | ||
| "github": "hugooole", | ||
| "github_user_id": 232750829, | ||
meteorcloudy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "name": "zhiguo" | ||
| } | ||
| ], | ||
| "repository": [ | ||
| "github:martin-olivier/dylib" | ||
| ], | ||
| "versions": [ | ||
| "2.2.1" | ||
| ], | ||
| "yanked_versions": {} | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.