First Commit
This commit is contained in:
1
externals/fmt/support/bazel/.bazelversion
vendored
Normal file
1
externals/fmt/support/bazel/.bazelversion
vendored
Normal file
@@ -0,0 +1 @@
|
||||
7.1.2
|
||||
20
externals/fmt/support/bazel/BUILD.bazel
vendored
Normal file
20
externals/fmt/support/bazel/BUILD.bazel
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
cc_library(
|
||||
name = "fmt",
|
||||
srcs = [
|
||||
#"src/fmt.cc", # No C++ module support, yet in Bazel (https://github.com/bazelbuild/bazel/pull/19940)
|
||||
"src/format.cc",
|
||||
"src/os.cc",
|
||||
],
|
||||
hdrs = glob([
|
||||
"include/fmt/*.h",
|
||||
]),
|
||||
copts = select({
|
||||
"@platforms//os:windows": ["-utf-8"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
includes = [
|
||||
"include",
|
||||
],
|
||||
strip_include_prefix = "include",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
6
externals/fmt/support/bazel/MODULE.bazel
vendored
Normal file
6
externals/fmt/support/bazel/MODULE.bazel
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
module(
|
||||
name = "fmt",
|
||||
compatibility_level = 10,
|
||||
)
|
||||
|
||||
bazel_dep(name = "platforms", version = "0.0.10")
|
||||
28
externals/fmt/support/bazel/README.md
vendored
Normal file
28
externals/fmt/support/bazel/README.md
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
# Bazel support
|
||||
|
||||
To get [Bazel](https://bazel.build/) working with {fmt} you can copy the files `BUILD.bazel`,
|
||||
`MODULE.bazel`, `WORKSPACE.bazel`, and `.bazelversion` from this folder (`support/bazel`) to the root folder of this project.
|
||||
This way {fmt} gets bazelized and can be used with Bazel (e.g. doing a `bazel build //...` on {fmt}).
|
||||
|
||||
## Using {fmt} as a dependency
|
||||
|
||||
### Using Bzlmod
|
||||
|
||||
The [Bazel Central Registry](https://github.com/bazelbuild/bazel-central-registry/tree/main/modules/fmt) provides support for {fmt}.
|
||||
|
||||
For instance, to use {fmt} add to your `MODULE.bazel` file:
|
||||
|
||||
```
|
||||
bazel_dep(name = "fmt", version = "10.2.1")
|
||||
```
|
||||
|
||||
### Live at head
|
||||
|
||||
For a live-at-head approach, you can copy the contents of this repository and move the Bazel-related build files to the root folder of this project as described above and make use of `local_path_override`, e.g.:
|
||||
|
||||
```
|
||||
local_path_override(
|
||||
module_name = "fmt",
|
||||
path = "../third_party/fmt",
|
||||
)
|
||||
```
|
||||
2
externals/fmt/support/bazel/WORKSPACE.bazel
vendored
Normal file
2
externals/fmt/support/bazel/WORKSPACE.bazel
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# WORKSPACE marker file needed by Bazel
|
||||
|
||||
Reference in New Issue
Block a user