Skip to content

Commit ae018c9

Browse files
committed
Initial
1 parent 87ea892 commit ae018c9

3 files changed

Lines changed: 15 additions & 67 deletions

File tree

CMake/resolve_dependency_modules/duckdb.cmake

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,19 @@ velox_resolve_dependency_url(DUCKDB)
2525

2626
message(STATUS "Building DuckDB from source")
2727
# We need remove-ccache.patch to remove adding ccache to the build command
28-
# twice. Velox already does this. We need fix-duckdbversion.patch as DuckDB
29-
# tries to infer the version via a git commit hash or git tag. This inference
30-
# can lead to errors when building in another git project such as Prestissimo.
28+
# twice. Velox already does this.
3129
FetchContent_Declare(
3230
duckdb
3331
URL ${VELOX_DUCKDB_SOURCE_URL}
3432
URL_HASH ${VELOX_DUCKDB_BUILD_SHA256_CHECKSUM}
35-
PATCH_COMMAND
36-
git apply ${CMAKE_CURRENT_LIST_DIR}/duckdb/remove-ccache.patch && git apply
37-
${CMAKE_CURRENT_LIST_DIR}/duckdb/fix-duckdbversion.patch && git apply
38-
${CMAKE_CURRENT_LIST_DIR}/duckdb/re2.patch)
33+
PATCH_COMMAND git apply ${CMAKE_CURRENT_LIST_DIR}/duckdb/remove-ccache.patch
34+
&& git apply ${CMAKE_CURRENT_LIST_DIR}/duckdb/re2.patch)
3935

36+
# DuckDB uses git commands to retrieve version information during the build,
37+
# which works with git clone. To prevent incorrectly using the parent project's
38+
# git version when building from a tarball, we define GIT_COMMIT_HASH to skip
39+
# that.
40+
set(GIT_COMMIT_HASH "6536a77")
4041
set(BUILD_UNITTESTS OFF)
4142
set(ENABLE_SANITIZER OFF)
4243
set(ENABLE_UBSAN OFF)

CMake/resolve_dependency_modules/duckdb/fix-duckdbversion.patch

Lines changed: 0 additions & 59 deletions
This file was deleted.

scripts/setup-common.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,13 @@ function install_fbthrift {
9696
function install_duckdb {
9797
if $BUILD_DUCKDB; then
9898
wget_and_untar https://github.com/duckdb/duckdb/archive/refs/tags/"${DUCKDB_VERSION}".tar.gz duckdb
99-
cmake_install_dir duckdb -DBUILD_UNITTESTS=OFF -DENABLE_SANITIZER=OFF -DENABLE_UBSAN=OFF -DBUILD_SHELL=OFF -DEXPORT_DLL_SYMBOLS=OFF -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}"
99+
# DuckDB uses git commands to retrieve version information during the build,
100+
# which works with git clone. To prevent incorrectly using the parent project's
101+
# git version when building from a tarball, we define GIT_COMMIT_HASH to skip
102+
# that.
103+
cmake_install_dir duckdb \
104+
-DGIT_COMMIT_HASH="6536a77" -DBUILD_UNITTESTS=OFF -DENABLE_SANITIZER=OFF -DENABLE_UBSAN=OFF \
105+
-DBUILD_SHELL=OFF -DEXPORT_DLL_SYMBOLS=OFF -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}"
100106
fi
101107
}
102108

0 commit comments

Comments
 (0)