This commit is contained in:
Ethan 2021-09-30 11:12:52 -05:00 committed by GitHub
commit dd8e82eafb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 1 deletions

View File

@ -2,6 +2,9 @@ cc_library(
name = "yaml-cpp_internal",
visibility = ["//:__subpackages__"],
strip_include_prefix = "src",
copts = [
"-std=c++11",
],
hdrs = glob(["src/**/*.h"]),
)
@ -9,6 +12,9 @@ cc_library(
name = "yaml-cpp",
visibility = ["//visibility:public"],
includes = ["include"],
copts = [
"-std=c++11",
],
hdrs = glob(["include/**/*.h"]),
srcs = glob(["src/**/*.cpp", "src/**/*.h"]),
)

View File

@ -10,6 +10,8 @@ If you find a bug, post an [issue](https://github.com/jbeder/yaml-cpp/issues)! I
# How to Build #
## CMake
yaml-cpp uses [CMake](http://www.cmake.org) to support cross-platform building. The basic steps to build are:
1. Download and install [CMake](http://www.cmake.org) (Resources -> Download).
@ -42,6 +44,28 @@ cmake [-G generator] [-DYAML_BUILD_SHARED_LIBS=ON|OFF] ..
5. To clean up, just remove the `build` directory.
## Bazel
### Build
```bash
$ bazel build :yaml-cpp
```
### External Dependency
```python
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
# ----------------------------------------------------------------------
# Yaml parser
# ----------------------------------------------------------------------
git_repository(
name = "yaml_parser",
remote = "https://github.com/yicm/yaml-cpp.git",
commit = "c5d1fcf",
)
```
# Recent Release #
[yaml-cpp 0.6.0](https://github.com/jbeder/yaml-cpp/releases/tag/yaml-cpp-0.6.0) has been released! This release requires C++11, and no longer depends on Boost.
@ -50,7 +74,7 @@ cmake [-G generator] [-DYAML_BUILD_SHARED_LIBS=ON|OFF] ..
**The old API will continue to be supported, and will still receive bugfixes!** The 0.3.x and 0.4.x versions will be old API releases, and 0.5.x and above will all be new API releases.
# API Documentation
# API Documentation
The autogenerated API reference is hosted on [CodeDocs](https://codedocs.xyz/jbeder/yaml-cpp/index.html)