From 02f8a67b21f605f4da808d35aca06cef4e3f7575 Mon Sep 17 00:00:00 2001 From: n7800 <136915399+n7800@users.noreply.github.com> Date: Wed, 17 Sep 2025 19:28:59 +0500 Subject: [PATCH 1/4] Fixed the branch name in the link --- docs/guides/build-and-link/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/build-and-link/index.md b/docs/guides/build-and-link/index.md index b7888e8441..993f98ba4e 100644 --- a/docs/guides/build-and-link/index.md +++ b/docs/guides/build-and-link/index.md @@ -57,7 +57,7 @@ Here are some of the most useful: | `STDCALL` | *(MSVC Only)* By default, libgit2 builds with the `cdecl` calling convention. If you're working with Win32 or the CLR, set this to `ON` to build with the `stdcall` convention. | | `STATIC_CRT` | *(MSVC Only)* libgit2 will link the static CRT libraries. This defaults to `ON` | -Take a look at the [`CMakeLists.txt`](https://github.com/libgit2/libgit2/blob/master/CMakeLists.txt) file for more information. +Take a look at the [`CMakeLists.txt`](https://github.com/libgit2/libgit2/blob/main/CMakeLists.txt) file for more information. # Linking and Usage From cf303a09c04252a94d9d538092ff6aeb3293498c Mon Sep 17 00:00:00 2001 From: n7800 <136915399+n7800@users.noreply.github.com> Date: Wed, 17 Sep 2025 19:44:49 +0500 Subject: [PATCH 2/4] Note about the parameter list's version dependency --- docs/guides/build-and-link/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/build-and-link/index.md b/docs/guides/build-and-link/index.md index 993f98ba4e..b0d682cb28 100644 --- a/docs/guides/build-and-link/index.md +++ b/docs/guides/build-and-link/index.md @@ -57,7 +57,7 @@ Here are some of the most useful: | `STDCALL` | *(MSVC Only)* By default, libgit2 builds with the `cdecl` calling convention. If you're working with Win32 or the CLR, set this to `ON` to build with the `stdcall` convention. | | `STATIC_CRT` | *(MSVC Only)* libgit2 will link the static CRT libraries. This defaults to `ON` | -Take a look at the [`CMakeLists.txt`](https://github.com/libgit2/libgit2/blob/main/CMakeLists.txt) file for more information. +This list may not be suitable for your version. For a full list of available options, see the [`CMakeLists.txt`](https://github.com/libgit2/libgit2/blob/main/CMakeLists.txt) file in the libgit2 repository (and its commit history). # Linking and Usage From b509432e6e66a4455849eb640ae330126cbe26f8 Mon Sep 17 00:00:00 2001 From: n7800 <136915399+n7800@users.noreply.github.com> Date: Wed, 17 Sep 2025 19:49:44 +0500 Subject: [PATCH 3/4] The BUILD_CLAR option has been renamed to BUILD_TESTS --- docs/guides/build-and-link/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/build-and-link/index.md b/docs/guides/build-and-link/index.md index b0d682cb28..b433c1e70f 100644 --- a/docs/guides/build-and-link/index.md +++ b/docs/guides/build-and-link/index.md @@ -51,7 +51,7 @@ Here are some of the most useful: | --- | --- | | `BUILD_SHARED_LIBS` | This defaults to `ON`, which produces dynamic libraries (DLLs on Windows). Set it to `OFF` if you want the build to generate static libraries. | | `CMAKE_BUILD_TYPE` | This selects the build configuration; available options are `Debug` (the default), `Release`, and `RelWithDebInfo`. In the case of Visual Studio and other multi-configuration project systems, this selects the default build configuration. | -| `BUILD_CLAR` | Selects whether the unit-test suite is built. This defaults to `ON`; set to `OFF` for a faster build. | +| `BUILD_TESTS` | Selects whether the unit-test suite is built. This defaults to `ON`; set to `OFF` for a faster build. | | `THREADSAFE` | Selects whether libgit2 tries to be threadsafe. This defaults to `ON`, unless you **know** your application will only be single-threaded, it's recommended you leave it `ON`. | | `LIBGIT2_FILENAME` | Sets the basename of the output binary. For example, if this is set to `foo`, the output will be something like `foo.dll` or `foo.so`. This option is useful to know what version of libgit2 was built, if your build system doesn't embed that information into the binary. | | `STDCALL` | *(MSVC Only)* By default, libgit2 builds with the `cdecl` calling convention. If you're working with Win32 or the CLR, set this to `ON` to build with the `stdcall` convention. | From f2a737cd138acf473ece1663b06ba88fd0be4d13 Mon Sep 17 00:00:00 2001 From: n7800 <136915399+n7800@users.noreply.github.com> Date: Wed, 17 Sep 2025 19:56:55 +0500 Subject: [PATCH 4/4] CMAKE_BUILD_TYPE also supports MinSizeRel --- docs/guides/build-and-link/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/build-and-link/index.md b/docs/guides/build-and-link/index.md index b433c1e70f..3f7511212b 100644 --- a/docs/guides/build-and-link/index.md +++ b/docs/guides/build-and-link/index.md @@ -50,7 +50,7 @@ Here are some of the most useful: | Option | Notes | | --- | --- | | `BUILD_SHARED_LIBS` | This defaults to `ON`, which produces dynamic libraries (DLLs on Windows). Set it to `OFF` if you want the build to generate static libraries. | -| `CMAKE_BUILD_TYPE` | This selects the build configuration; available options are `Debug` (the default), `Release`, and `RelWithDebInfo`. In the case of Visual Studio and other multi-configuration project systems, this selects the default build configuration. | +| `CMAKE_BUILD_TYPE` | This selects the build configuration; available options are `Debug` (the default), `Release`, `RelWithDebInfo` and `MinSizeRel`. In the case of Visual Studio and other multi-configuration project systems, this selects the default build configuration. | | `BUILD_TESTS` | Selects whether the unit-test suite is built. This defaults to `ON`; set to `OFF` for a faster build. | | `THREADSAFE` | Selects whether libgit2 tries to be threadsafe. This defaults to `ON`, unless you **know** your application will only be single-threaded, it's recommended you leave it `ON`. | | `LIBGIT2_FILENAME` | Sets the basename of the output binary. For example, if this is set to `foo`, the output will be something like `foo.dll` or `foo.so`. This option is useful to know what version of libgit2 was built, if your build system doesn't embed that information into the binary. |