summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2022-06-14 22:29:10 -0400
committerEdward Thomson <ethomson@edwardthomson.com>2022-06-20 17:12:49 -0400
commit6c57bac6b18f6a30e1a8c8272a8dc367f202aa88 (patch)
tree776f5f9023d3b0076229d1750ff6cedbcd54ef7a /cmake
parentd103620158bb5aca73bc0dad8a230ceda417ab47 (diff)
downloadlibgit2-6c57bac6b18f6a30e1a8c8272a8dc367f202aa88.tar.gz
sha256: make sha256 an experimental optional feature
libgit2 can be built with optional, experimental sha256 support. This allows consumers to begin testing and providing feedback for our sha256 support while we continue to develop it, and allows us to make API breaking changes while we iterate on a final sha256 implementation. The results will be `git2-experimental.dll` and installed as `git2-experimental.h` to avoid confusion with a production libgit2.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/ExperimentalFeatures.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/cmake/ExperimentalFeatures.cmake b/cmake/ExperimentalFeatures.cmake
new file mode 100644
index 000000000..f23bfe376
--- /dev/null
+++ b/cmake/ExperimentalFeatures.cmake
@@ -0,0 +1,12 @@
+if(EXPERIMENTAL_SHA256)
+ add_feature_info("SHA256 API" ON "experimental SHA256 APIs")
+
+ set(EXPERIMENTAL 1)
+ set(GIT_EXPERIMENTAL_SHA256 1)
+else()
+ add_feature_info("SHA256 API" OFF "experimental SHA256 APIs")
+endif()
+
+if(EXPERIMENTAL)
+ set(LIBGIT2_FILENAME "${LIBGIT2_FILENAME}-experimental")
+endif()