MONGOCRYPT-483 make CMAKE_BUILD_TYPE configurable.
#532
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
LIBMONGOCRYPT_BUILD_TYPEoption to makeCMAKE_BUILD_TYPEconfigurable.Background & Motivation
This is motivated by updating libmongocrypt to support decimal128 Range Index CDRIVER-4394.
The C driver currently builds libmongocrypt by invoking
cmakedirectly incompile-unix.shandcompile-windows.sh. Here is the snippet from compile-windows.sh:#522 (comment) notes the required version of cmake to build libmongocrypt is cmake will soon be 3.12.0. The C driver builds with older versions of cmake in some distros. libmongocrypt's
ensure-cmake.shscript ensures the presence of a CMake executable matching a specific version. Therefore, the C driver will transition to building libmongocrypt using thecompile.shscript (as is currently done in the Go driver). Here is a proposed change incompile-windows.shAdding the
LIBMONGOCRYPT_BUILD_TYPEoption enables the C driver to continue building libmongocrypt with the sameCMAKE_BUILD_TYPEas the C driver.