Skip to content

Commit 0070a3e

Browse files
authored
CDRIVER-4763 reapply BUILD_VERSION CMake option (#1462)
* document removal of BUILD_VERSION * apply `BUILD_VERSION` from CMake option if specified * update NEWS
1 parent ca724d2 commit 0070a3e

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

NEWS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
libmongoc 1.25.1 (Unreleased)
2+
=============================
3+
4+
Fixes:
5+
6+
* Add back support for `BUILD_VERSION` CMake option. `BUILD_VERSION` was unintentionally removed in 1.25.0.
7+
18
libmongoc 1.25.0
29
================
310

build/cmake/BuildVersion.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ function(compute_build_version outvar)
4646
set("${outvar}" "${output}" PARENT_SCOPE)
4747
endfunction()
4848

49-
# Define the BUILD_VERSION:
50-
compute_build_version(BUILD_VERSION)
49+
# Compute the BUILD_VERSION if it is not already defined:
50+
if(NOT DEFINED BUILD_VERSION)
51+
compute_build_version(BUILD_VERSION)
52+
endif()
5153

5254
# Set a BUILD_VERSION_SIMPLE, which is just a three-number-triple that CMake understands
5355
string (REGEX REPLACE "([0-9]+\\.[0-9]+\\.[0-9]+).*$" "\\1" BUILD_VERSION_SIMPLE "${BUILD_VERSION}")

0 commit comments

Comments
 (0)