From 06f2b5b9f794f8d2fb5bb4383c5bbf8a3d7bca1d Mon Sep 17 00:00:00 2001 From: Simon Gene Gottlieb Date: Thu, 19 Mar 2026 11:06:37 +0100 Subject: [PATCH 1/2] doc: clarify on the location for the 'build' folder --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 285644ed7..1b965ac0c 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,15 @@ If you find a bug, post an [issue](https://github.com/jbeder/yaml-cpp/issues)! I **Note:** If you don't use the provided installer for your platform, make sure that you add `CMake`'s bin folder to your path. -#### 1. Navigate into the source directory, create build folder and run `CMake`: +#### 1. Clone the repository +```sh +git clone https://github.com/jbeder/yaml-cpp.git +``` + +#### 2. Navigate into the root directory of the repository, create a build folder and run `CMake`: ```sh +cd yaml-cpp mkdir build cd build cmake [-G generator] [-DYAML_BUILD_SHARED_LIBS=on|OFF] .. @@ -44,7 +50,7 @@ cmake [-G generator] [-DYAML_BUILD_SHARED_LIBS=on|OFF] .. * For more options on customizing the build, see the [CMakeLists.txt](https://github.com/jbeder/yaml-cpp/blob/master/CMakeLists.txt) file. -#### 2. Build it! +#### 3. Build it! * The command you'll need to run depends on the generator you chose earlier. **Note:** To clean up, just remove the `build` directory. From c53e4bd0d8d3966433f11927ae91611c97612ad1 Mon Sep 17 00:00:00 2001 From: Simon Gene Gottlieb Date: Thu, 19 Mar 2026 11:06:54 +0100 Subject: [PATCH 2/2] doc: add a list of all cmake options for yaml-cpp --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 1b965ac0c..66c6e9b1a 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,23 @@ cmake [-G generator] [-DYAML_BUILD_SHARED_LIBS=on|OFF] .. **Note:** To clean up, just remove the `build` directory. +### Options +There are multiple options that can be set when calling `cmake`. + +Standard: +- `YAML_BUILD_SHARED_LIBS`: Build yaml-cpp shared libraryif the library should be build as a shared or static library (default: ${BUILD_SHARED_LIBS}) +- `YAML_CPP_BUILD_CONTRIB`: Enable yaml-cpp contrib in library (default: ON) +- `YAML_CPP_BUILD_TESTS`: Enable yaml-cpp tests (default: OFF) +- `YAML_CPP_BUILD_TOOLS`: Enable parse tools (default: ON) +- `YAML_CPP_CLANG_FORMAT_EXE`: Path to the clang format executable +- `YAML_CPP_DISABLE_UNINSTALL`: Disable uninstallation of yaml-cpp (default: OFF) +- `YAML_CPP_FORMAT_SOURCE`: Format source (default: ${YAML_CPP_MAIN_PROJECT}) +- `YAML_CPP_INSTALL`: Enable generation of yaml-cpp install targets (default: ${YAML_CPP_MAIN_PROJECT}) +- `YAML_CPP_INSTALL_CMAKEDIR`: Path to install the CMake package to +- `YAML_MSVC_SHARED_RT`: MSVC: Build yaml-cpp with shared runtime libs (/MD) (default: ON) +- `YAML_ENABLE_PIC`: Use Position-Independent Code (default: ON) +- `YAML_USE_SYSTEM_GTEST`: Use system googletest if found (default: OFF) + ## How to Integrate it within your project using CMake You can use for example FetchContent :