From 8f0d5e2904a9156f1a295d13d3b8c6594a8f88e3 Mon Sep 17 00:00:00 2001 From: Kevin Albertson Date: Wed, 1 Nov 2023 13:32:02 -0400 Subject: [PATCH 1/3] document removal of BUILD_VERSION --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index d27e55dd97e..0cbb2492839 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,7 @@ Improvements: Build Configuration: * Remove `ENABLE_SRV=AUTO`. Only support boolean values for `ENABLE_SRV`. + * Remove `BUILD_VERSION` CMake option. To set a build version, create a file in the source root named `VERSION_CURRENT` containing the version. Platform Support: From 1ab7c8df2762f5c5b217d1882fc49ed538a6983b Mon Sep 17 00:00:00 2001 From: Kevin Albertson Date: Wed, 1 Nov 2023 15:04:50 -0400 Subject: [PATCH 2/3] apply `BUILD_VERSION` from CMake option if specified --- build/cmake/BuildVersion.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build/cmake/BuildVersion.cmake b/build/cmake/BuildVersion.cmake index 4b04eb8cf1c..18d29a0c218 100644 --- a/build/cmake/BuildVersion.cmake +++ b/build/cmake/BuildVersion.cmake @@ -46,8 +46,10 @@ function(compute_build_version outvar) set("${outvar}" "${output}" PARENT_SCOPE) endfunction() -# Define the BUILD_VERSION: -compute_build_version(BUILD_VERSION) +# Compute the BUILD_VERSION if it is not already defined: +if(NOT DEFINED BUILD_VERSION) + compute_build_version(BUILD_VERSION) +endif() # Set a BUILD_VERSION_SIMPLE, which is just a three-number-triple that CMake understands string (REGEX REPLACE "([0-9]+\\.[0-9]+\\.[0-9]+).*$" "\\1" BUILD_VERSION_SIMPLE "${BUILD_VERSION}") From fbabe30cd57689e394b5a0fa28b7dda44c82e8b6 Mon Sep 17 00:00:00 2001 From: Kevin Albertson Date: Wed, 1 Nov 2023 15:04:59 -0400 Subject: [PATCH 3/3] update NEWS --- NEWS | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 0cbb2492839..7389021c74c 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,10 @@ +libmongoc 1.25.1 (Unreleased) +============================= + +Fixes: + + * Add back support for `BUILD_VERSION` CMake option. `BUILD_VERSION` was unintentionally removed in 1.25.0. + libmongoc 1.25.0 ================ @@ -15,7 +22,6 @@ Improvements: Build Configuration: * Remove `ENABLE_SRV=AUTO`. Only support boolean values for `ENABLE_SRV`. - * Remove `BUILD_VERSION` CMake option. To set a build version, create a file in the source root named `VERSION_CURRENT` containing the version. Platform Support: