···11+cmake_minimum_required(VERSION 3.10)
22+33+# Thin wrapper so `cmake -S .` behaves like `cmake -S build/cmake`.
44+# Policy lives in build/cmake; keep parent project language-less.
55+project(zstd-superbuild LANGUAGES NONE)
66+77+if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
88+ message(FATAL_ERROR "In-source builds are not supported. Specify -B <build-dir>.")
99+endif()
1010+1111+add_subdirectory(build/cmake)
+25-18
vendor/git/zstd-c/README.md
···120120121121## Build instructions
122122123123-`make` is the officially maintained build system of this project.
124124-All other build systems are "compatible" and 3rd-party maintained,
125125-they may feature small differences in advanced options.
126126-When your system allows it, prefer using `make` to build `zstd` and `libzstd`.
123123+`make` is the main build system of this project.
124124+It is the reference, and other build systems are periodically updated to stay compatible.
125125+However, small drifts and feature differences can be present, since perfect synchronization is difficult.
126126+For this reason, when your build system allows it, prefer employing `make`.
127127128128### Makefile
129129130130Assuming your system supports standard `make` (or `gmake`),
131131-invoking `make` in root directory will generate `zstd` cli in root directory.
132132-It will also create `libzstd` into `lib/`.
131131+just invoking `make` in root directory generates `zstd` cli at root,
132132+and also generates `libzstd` into `lib/`.
133133134134Other standard targets include:
135135-- `make install` : create and install zstd cli, library and man pages
136136-- `make check` : create and run `zstd`, test its behavior on local platform
135135+- `make install` : install zstd cli, library and man pages
136136+- `make check` : run `zstd`, test its essential behavior on local platform
137137138138The `Makefile` follows the [GNU Standard Makefile conventions](https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html),
139139allowing staged install, standard compilation flags, directory variables and command variables.
···144144145145### cmake
146146147147-A `cmake` project generator is provided within `build/cmake`.
148148-It can generate Makefiles or other build scripts
149149-to create `zstd` binary, and `libzstd` dynamic and static libraries.
147147+A `cmake` project generator is available for generating Makefiles or other build scripts
148148+to create the `zstd` binary as well as `libzstd` dynamic and static libraries.
149149+The repository root now contains a minimal `CMakeLists.txt` that forwards to `build/cmake`,
150150+so you can configure the project with a standard `cmake -S .` invocation,
151151+while the historical `cmake -S build/cmake` entry point remains fully supported.
152152+153153+```bash
154154+cmake -S . -B build-cmake
155155+cmake --build build-cmake
156156+```
150157151158By default, `CMAKE_BUILD_TYPE` is set to `Release`.
152159···156163To perform a Fat/Universal2 build and install use the following commands:
157164158165```bash
159159-cmake -B build-cmake-debug -S build/cmake -G Ninja -DCMAKE_OSX_ARCHITECTURES="x86_64;x86_64h;arm64"
166166+cmake -S . -B build-cmake-debug -G Ninja -DCMAKE_OSX_ARCHITECTURES="x86_64;x86_64h;arm64"
160167cd build-cmake-debug
161168ninja
162169sudo ninja install
···198205### Visual Studio (Windows)
199206200207Going into `build` directory, you will find additional possibilities:
201201-- Projects for Visual Studio 2005, 2008 and 2010.
208208+- Projects for Visual Studio 2008 and 2010.
202209 + VS2010 project is compatible with VS2012, VS2013, VS2015 and VS2017.
203210- Automated build scripts for Visual compiler by [@KrzysFR](https://github.com/KrzysFR), in `build/VS_scripts`,
204211 which will build `zstd` cli and `libzstd` library without any need to open Visual Studio solution.
212212+- It is now recommended to generate Visual Studio solutions from `cmake`
205213206214### Buck
207215···210218211219### Bazel
212220213213-You easily can integrate zstd into your Bazel project by using the module hosted on the [Bazel Central Repository](https://registry.bazel.build/modules/zstd).
221221+You can integrate zstd into your Bazel project by using the module hosted on the [Bazel Central Repository](https://registry.bazel.build/modules/zstd).
214222215223## Testing
216224···221229222230## Status
223231224224-Zstandard is currently deployed within Facebook and many other large cloud infrastructures.
225225-It is run continuously to compress large amounts of data in multiple formats and use cases.
226226-Zstandard is considered safe for production environments.
232232+Zstandard is deployed within Meta and many other large cloud infrastructures,
233233+to compress humongous amounts of data in various formats and use cases.
234234+It is also continuously fuzzed for security issues by Google's [oss-fuzz](https://github.com/google/oss-fuzz/tree/master/projects/zstd) program.
227235228236## License
229237···232240## Contributing
233241234242The `dev` branch is the one where all contributions are merged before reaching `release`.
235235-If you plan to propose a patch, please commit into the `dev` branch, or its own feature branch.
236243Direct commit to `release` are not permitted.
237244For more information, please read [CONTRIBUTING](CONTRIBUTING.md).
+9
vendor/git/zstd-c/build/cmake/README.md
···7788## How to build
991010+You can configure the project from the repository root thanks to the forwarding
1111+`CMakeLists.txt`:
1212+```sh
1313+cmake -S . -B build-cmake
1414+cmake --build build-cmake
1515+```
1616+The historical workflow that starts configuration from `build/cmake` continues
1717+to work as described below.
1818+1019As cmake doesn't support command like `cmake clean`, it's recommended to perform an "out of source build".
1120To do this, you can create a new directory and build in it:
1221```sh