Skip to content

CDRIVER-4763 reapply BUILD_VERSION CMake option #1462

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -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
================

Expand Down
6 changes: 4 additions & 2 deletions build/cmake/BuildVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}")