Skip to content

Commit

Permalink
add gsl to bcr
Browse files Browse the repository at this point in the history
  • Loading branch information
ziad-fernride committed Jul 9, 2024
1 parent d459249 commit c80f68c
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/gsl/4.0.0/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module(
name = "gsl",
version = "4.0.0",
compatibility_level = 4,
)

bazel_dep(name = "rules_cc", version = "0.0.9")
27 changes: 27 additions & 0 deletions modules/gsl/4.0.0/patches/build_dot_bazel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
--- /dev/null
+++ BUILD.bazel
@@ -0,0 +1,24 @@
+load("@rules_cc//cc:defs.bzl", "cc_library")
+
+cc_library(
+ name = "gsl",
+ hdrs = [
+ "gsl/algorithm",
+ "gsl/assert",
+ "gsl/byte",
+ "gsl/gsl",
+ "gsl/gsl_algorithm",
+ "gsl/gsl_assert",
+ "gsl/gsl_byte",
+ "gsl/gsl_narrow",
+ "gsl/gsl_util",
+ "gsl/narrow",
+ "gsl/pointers",
+ "gsl/span",
+ "gsl/span_ext",
+ "gsl/string_span",
+ "gsl/util",
+ ],
+ includes = ["."],
+ visibility = ["//visibility:public"],
+)
8 changes: 8 additions & 0 deletions modules/gsl/4.0.0/patches/module_dot_bazel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
--- /dev/null
+++ MODULE.bazel
@@ -0,0 +1,5 @@
+module(
+ name = "gsl",
+ version = "4.0.0",
+ compatibility_level = 4,
+)
11 changes: 11 additions & 0 deletions modules/gsl/4.0.0/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
matrix:
bazel: ["6.x", "7.x"]
platform: ["debian10", "macos", "macos_arm64", "ubuntu2004", "windows"]

tasks:
verify_targets:
name: Verify build targets
bazel: ${{ bazel }}
platform: ${{ platform }}
build_targets:
- '@gsl//:gsl'
9 changes: 9 additions & 0 deletions modules/gsl/4.0.0/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"integrity": "sha256-65H8sQpqpcyx0iTgelbI7P/pobtgH6GEgnbsRqIgC/s=",
"patches": {
"build_dot_bazel.patch": "sha256-4Lo5q23jOPGlpXKmpPqxk90jQSuTf8o63QJE7MLxqmA=",
"module_dot_bazel.patch": "sha256-I5KhvDC32BRXw0A8KKVQ4MTaSFRWPo7Nhiy/bxy7Oic="
},
"strip_prefix": "GSL-4.0.0/include",
"url": "https://github.com/microsoft/GSL/archive/refs/tags/v4.0.0.zip"
}
5 changes: 5 additions & 0 deletions modules/gsl/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"versions": [
"4.0.0"
]
}

0 comments on commit c80f68c

Please sign in to comment.