Skip to content
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

MONGOCRYPT-685 fix disabling patching and whitespace #837

Merged
merged 2 commits into from
Jun 17, 2024
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
1 change: 1 addition & 0 deletions cmake/FetchMongoC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set (MONGOC_FETCH_TAG_FOR_LIBBSON "1.27.1" CACHE STRING "The Git tag of mongo-c-

# Add an option to disable patching if a patch command is unavailable.
option (LIBBSON_PATCH_ENABLED "Whether to apply patches to the libbson library" ON)
set (patch_disabled OFF)
if (NOT LIBBSON_PATCH_ENABLED)
set (patch_disabled ON)
endif ()
Expand Down
1 change: 1 addition & 0 deletions cmake/IntelDFP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ if (NOT INTEL_DFP_LIBRARY_URL_SHA256 STREQUAL "no-verify")
set (_hash_arg URL_HASH "${INTEL_DFP_LIBRARY_URL_HASH}")
endif ()

set (patch_disabled OFF)
if (NOT INTEL_DFP_LIBRARY_PATCH_ENABLED)
set (patch_disabled ON)
endif ()
Expand Down
2 changes: 2 additions & 0 deletions cmake/Patch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ function(make_patch_command out)
if(patch_STRIP_COMPONENTS)
list(APPEND cmd -p${patch_STRIP_COMPONENTS})
endif()
# Ignore whitespace errors to fix patch errors on Windows: The patch file may be converted to \r\n by git, but libbson fetched with \n.
list(APPEND cmd "--ignore-whitespace")
# git accepts patch filepaths as positional arguments
list(APPEND cmd ${patch_PATCHES})
else()
Expand Down