Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,19 @@ cc_library(
name = "yaml-cpp_internal",
visibility = ["//:__subpackages__"],
strip_include_prefix = "src",
copts = [
"-std=c++11",
],
hdrs = glob(["src/**/*.h"]),
)

cc_library(
name = "yaml-cpp",
visibility = ["//visibility:public"],
includes = ["include"],
copts = [
"-std=c++11",
],
hdrs = glob(["include/**/*.h"]),
srcs = glob(["src/**/*.cpp", "src/**/*.h"]),
defines = yaml_cpp_defines,
Expand Down
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ See [Tutorial](https://github.com/jbeder/yaml-cpp/wiki/Tutorial) and [How to Emi
If you find a bug, post an [issue](https://github.com/jbeder/yaml-cpp/issues)! If you have questions about how to use yaml-cpp, please post it on http://stackoverflow.com and tag it [`yaml-cpp`](http://stackoverflow.com/questions/tagged/yaml-cpp).

## How to Build
### CMake

`yaml-cpp` uses [CMake](http://www.cmake.org) to support cross-platform building. Install [CMake](http://www.cmake.org) _(Resources -> Download)_ before proceeding. The basic steps to build are:

Expand Down Expand Up @@ -66,6 +67,29 @@ FetchContent_MakeAvailable(yaml-cpp)
target_link_libraries(YOUR_LIBRARY PUBLIC yaml-cpp::yaml-cpp) # The library or executable that require yaml-cpp library
```

### 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 Releases

[yaml-cpp 0.9.0](https://github.com/jbeder/yaml-cpp/releases/tag/yaml-cpp-0.9.0) released!
Expand All @@ -74,7 +98,7 @@ target_link_libraries(YOUR_LIBRARY PUBLIC yaml-cpp::yaml-cpp) # The library or e

**The old API will stop receiving bugfixes in 2026.** The 0.3.x versions provide the old API, and 0.5.x and above all provide the new API.

# API Documentation
# API Documentation

The autogenerated API reference is hosted on [CodeDocs](https://codedocs.xyz/jbeder/yaml-cpp/index.html)

Expand Down
Loading