From 35c36b3035ec88f0dffafe73c7d22ed7d9159634 Mon Sep 17 00:00:00 2001 From: Manu Zhang Date: Fri, 13 Nov 2026 13:44:50 +0900 Subject: [PATCH 1/9] build: vendor FetchContent dependencies by default --- CMakeLists.txt | 6 ++++++ README.md | 7 ++++++- mkdocs/docs/getting-started.md | 7 ++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7a9c3b2ff1..63ab0036c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,6 +71,12 @@ option(ICEBERG_ENABLE_ASAN "Enable Address Sanitizer" OFF) option(ICEBERG_ENABLE_UBSAN "Enable Undefined Behavior Sanitizer" OFF) include(GNUInstallDirs) +# Use pinned dependency sources unless the caller explicitly enables package lookup. +set(FETCHCONTENT_TRY_FIND_PACKAGE_MODE + NEVER + CACHE STRING "Whether FetchContent should look for installed dependencies") +set_property(CACHE FETCHCONTENT_TRY_FIND_PACKAGE_MODE PROPERTY STRINGS NEVER OPT_IN + ALWAYS) include(FetchContent) set(ICEBERG_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}") diff --git a/README.md b/README.md index 12755f65f3..f8589de66e 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,10 @@ ctest --test-dir build --output-on-failure ## Build with CMake +Dependencies managed with CMake FetchContent use the pinned sources by default. +Set `-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=OPT_IN` to try installed packages before +fetching sources. Use a fresh build directory when changing this setting. + ### Build, Run Tests and Install Core Libraries ```bash @@ -85,7 +89,7 @@ cmake --install build #### Provided Apache Arrow ```bash -cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install -DCMAKE_PREFIX_PATH=/path/to/arrow -DICEBERG_BUILD_BUNDLE=ON +cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install -DCMAKE_PREFIX_PATH=/path/to/arrow -DICEBERG_BUILD_BUNDLE=ON -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=OPT_IN cmake --build build ctest --test-dir build --output-on-failure cmake --install build @@ -95,6 +99,7 @@ cmake --install build | Option | Default | Description | |--------|---------|-------------| +| `FETCHCONTENT_TRY_FIND_PACKAGE_MODE` | `NEVER` | Set to `OPT_IN` to try installed FetchContent dependencies before fetching sources | | `ICEBERG_BUILD_STATIC` | `ON` | Build static library | | `ICEBERG_BUILD_SHARED` | `OFF` | Build shared library | | `ICEBERG_BUILD_TESTS` | `ON` | Build tests | diff --git a/mkdocs/docs/getting-started.md b/mkdocs/docs/getting-started.md index 41d554c429..437c69e151 100644 --- a/mkdocs/docs/getting-started.md +++ b/mkdocs/docs/getting-started.md @@ -39,6 +39,10 @@ ctest --test-dir build --output-on-failure ## Build with CMake +Dependencies managed with CMake FetchContent use the pinned sources by default. +Set `-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=OPT_IN` to try installed packages before +fetching sources. Use a fresh build directory when changing this setting. + ### Core Libraries ```bash @@ -59,7 +63,7 @@ cmake --install build ### Bundle Library (with provided Apache Arrow) ```bash -cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install -DCMAKE_PREFIX_PATH=/path/to/arrow -DICEBERG_BUILD_BUNDLE=ON +cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install -DCMAKE_PREFIX_PATH=/path/to/arrow -DICEBERG_BUILD_BUNDLE=ON -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=OPT_IN cmake --build build cmake --install build ``` @@ -68,6 +72,7 @@ cmake --install build | Option | Default | Description | |--------|---------|-------------| +| `FETCHCONTENT_TRY_FIND_PACKAGE_MODE` | `NEVER` | Set to `OPT_IN` to try installed FetchContent dependencies before fetching sources | | `ICEBERG_BUILD_STATIC` | `ON` | Build static library | | `ICEBERG_BUILD_SHARED` | `OFF` | Build shared library | | `ICEBERG_BUILD_TESTS` | `ON` | Build tests | From f71d95512fcb2c47f8b79c9cc23d074f4e772588 Mon Sep 17 00:00:00 2001 From: Manu Zhang Date: Tue, 17 Nov 2026 15:45:45 +0800 Subject: [PATCH 2/9] build: require Arrow 25 for system dependencies Keep the minimum supported Arrow version separate from the vendored source version. Check it during FetchContent lookup, explicit Arrow and Parquet lookup, and installed Iceberg dependency discovery. Document source fallback for unsupported installed Arrow packages and the configuration error for unsupported Parquet packages. Co-authored-by: Codex --- README.md | 6 ++++++ cmake_modules/IcebergThirdpartyToolchain.cmake | 9 ++++++--- mkdocs/docs/getting-started.md | 6 ++++++ src/iceberg/iceberg-config.cmake.in | 2 ++ 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f8589de66e..f39047781a 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,12 @@ Dependencies managed with CMake FetchContent use the pinned sources by default. Set `-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=OPT_IN` to try installed packages before fetching sources. Use a fresh build directory when changing this setting. +Provided Apache Arrow and Parquet packages must be version 25.0.0 or a newer +compatible version. +With `OPT_IN`, an older Arrow package is skipped in favor of the pinned sources. +If a compatible Arrow package is found, a compatible Parquet package is required; +otherwise, CMake configuration fails. + ### Build, Run Tests and Install Core Libraries ```bash diff --git a/cmake_modules/IcebergThirdpartyToolchain.cmake b/cmake_modules/IcebergThirdpartyToolchain.cmake index b176dead8a..dbec61a069 100644 --- a/cmake_modules/IcebergThirdpartyToolchain.cmake +++ b/cmake_modules/IcebergThirdpartyToolchain.cmake @@ -94,6 +94,8 @@ endfunction() # cmake -S . -B build # +# Keep the minimum supported version independent of the vendored source version. +set(ICEBERG_ARROW_MIN_VERSION "25.0.0") set(ICEBERG_ARROW_BUILD_VERSION "25.0.0") set(ICEBERG_ARROW_BUILD_SHA256_CHECKSUM "12afc2dc8137bdd4a68876cec939f664c9d55cfc7b75f55b45163ebb4e344d81") @@ -260,7 +262,8 @@ function(resolve_arrow_dependency) URL ${ARROW_SOURCE_URL} URL_HASH "SHA256=${ICEBERG_ARROW_BUILD_SHA256_CHECKSUM}" PATCH_COMMAND ${ARROW_PATCH_COMMAND} SOURCE_SUBDIR cpp - FIND_PACKAGE_ARGS CONFIG) + FIND_PACKAGE_ARGS ${ICEBERG_ARROW_MIN_VERSION} + CONFIG) fetchcontent_makeavailable(Arrow) @@ -330,8 +333,8 @@ function(resolve_arrow_dependency) endif() else() set(ARROW_VENDORED FALSE) - find_package(Arrow CONFIG REQUIRED) - find_package(Parquet CONFIG REQUIRED) + find_package(Arrow ${ICEBERG_ARROW_MIN_VERSION} CONFIG REQUIRED) + find_package(Parquet ${ICEBERG_ARROW_MIN_VERSION} CONFIG REQUIRED) list(APPEND ICEBERG_SYSTEM_DEPENDENCIES Arrow Parquet) endif() diff --git a/mkdocs/docs/getting-started.md b/mkdocs/docs/getting-started.md index 437c69e151..5b45a2580f 100644 --- a/mkdocs/docs/getting-started.md +++ b/mkdocs/docs/getting-started.md @@ -43,6 +43,12 @@ Dependencies managed with CMake FetchContent use the pinned sources by default. Set `-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=OPT_IN` to try installed packages before fetching sources. Use a fresh build directory when changing this setting. +Provided Apache Arrow and Parquet packages must be version 25.0.0 or a newer +compatible version. +With `OPT_IN`, an older Arrow package is skipped in favor of the pinned sources. +If a compatible Arrow package is found, a compatible Parquet package is required; +otherwise, CMake configuration fails. + ### Core Libraries ```bash diff --git a/src/iceberg/iceberg-config.cmake.in b/src/iceberg/iceberg-config.cmake.in index c8e2334fa7..8e977cbe0d 100644 --- a/src/iceberg/iceberg-config.cmake.in +++ b/src/iceberg/iceberg-config.cmake.in @@ -44,6 +44,8 @@ set(ICEBERG_SYSTEM_DEPENDENCIES "@ICEBERG_SYSTEM_DEPENDENCIES@") # Extra args forwarded to find_dependency() for specific dependencies. set(ICEBERG_FIND_EXTRA_ARGS_AWSSDK "@ICEBERG_FIND_EXTRA_ARGS_AWSSDK@") +set(ICEBERG_FIND_EXTRA_ARGS_Arrow "@ICEBERG_ARROW_MIN_VERSION@;CONFIG") +set(ICEBERG_FIND_EXTRA_ARGS_Parquet "@ICEBERG_ARROW_MIN_VERSION@;CONFIG") include(CMakeFindDependencyMacro) From 35fd9f8cd81a8d6d224f6079ee71a65400a665d6 Mon Sep 17 00:00:00 2001 From: Manu Zhang Date: Tue, 17 Nov 2026 16:03:13 +0800 Subject: [PATCH 3/9] docs: centralize Arrow dependency requirements Keep the minimum-version explanation in the getting-started guide and refer to the configured requirement instead of duplicating its value. Co-authored-by: Codex --- README.md | 6 ------ mkdocs/docs/getting-started.md | 6 +++--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index f39047781a..f8589de66e 100644 --- a/README.md +++ b/README.md @@ -60,12 +60,6 @@ Dependencies managed with CMake FetchContent use the pinned sources by default. Set `-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=OPT_IN` to try installed packages before fetching sources. Use a fresh build directory when changing this setting. -Provided Apache Arrow and Parquet packages must be version 25.0.0 or a newer -compatible version. -With `OPT_IN`, an older Arrow package is skipped in favor of the pinned sources. -If a compatible Arrow package is found, a compatible Parquet package is required; -otherwise, CMake configuration fails. - ### Build, Run Tests and Install Core Libraries ```bash diff --git a/mkdocs/docs/getting-started.md b/mkdocs/docs/getting-started.md index 5b45a2580f..92b567b8e7 100644 --- a/mkdocs/docs/getting-started.md +++ b/mkdocs/docs/getting-started.md @@ -43,9 +43,9 @@ Dependencies managed with CMake FetchContent use the pinned sources by default. Set `-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=OPT_IN` to try installed packages before fetching sources. Use a fresh build directory when changing this setting. -Provided Apache Arrow and Parquet packages must be version 25.0.0 or a newer -compatible version. -With `OPT_IN`, an older Arrow package is skipped in favor of the pinned sources. +Provided Apache Arrow and Parquet packages must satisfy the minimum version set +by `ICEBERG_ARROW_MIN_VERSION` in `cmake_modules/IcebergThirdpartyToolchain.cmake`. +With `OPT_IN`, an unsupported Arrow package is skipped in favor of the pinned sources. If a compatible Arrow package is found, a compatible Parquet package is required; otherwise, CMake configuration fails. From e02080723527888bed044602cc3b2f94e90eada4 Mon Sep 17 00:00:00 2001 From: Manu Zhang Date: Tue, 17 Nov 2026 16:23:01 +0800 Subject: [PATCH 4/9] build: reuse Arrow build version for compatibility checks Use the source build version as the minimum accepted Arrow and Parquet package version in build and installed-package lookups. Remove the separate minimum-version setting and update the guide reference. Co-authored-by: Codex --- cmake_modules/IcebergThirdpartyToolchain.cmake | 8 +++----- mkdocs/docs/getting-started.md | 2 +- src/iceberg/iceberg-config.cmake.in | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/cmake_modules/IcebergThirdpartyToolchain.cmake b/cmake_modules/IcebergThirdpartyToolchain.cmake index dbec61a069..5c76f7a546 100644 --- a/cmake_modules/IcebergThirdpartyToolchain.cmake +++ b/cmake_modules/IcebergThirdpartyToolchain.cmake @@ -94,8 +94,6 @@ endfunction() # cmake -S . -B build # -# Keep the minimum supported version independent of the vendored source version. -set(ICEBERG_ARROW_MIN_VERSION "25.0.0") set(ICEBERG_ARROW_BUILD_VERSION "25.0.0") set(ICEBERG_ARROW_BUILD_SHA256_CHECKSUM "12afc2dc8137bdd4a68876cec939f664c9d55cfc7b75f55b45163ebb4e344d81") @@ -262,7 +260,7 @@ function(resolve_arrow_dependency) URL ${ARROW_SOURCE_URL} URL_HASH "SHA256=${ICEBERG_ARROW_BUILD_SHA256_CHECKSUM}" PATCH_COMMAND ${ARROW_PATCH_COMMAND} SOURCE_SUBDIR cpp - FIND_PACKAGE_ARGS ${ICEBERG_ARROW_MIN_VERSION} + FIND_PACKAGE_ARGS ${ICEBERG_ARROW_BUILD_VERSION} CONFIG) fetchcontent_makeavailable(Arrow) @@ -333,8 +331,8 @@ function(resolve_arrow_dependency) endif() else() set(ARROW_VENDORED FALSE) - find_package(Arrow ${ICEBERG_ARROW_MIN_VERSION} CONFIG REQUIRED) - find_package(Parquet ${ICEBERG_ARROW_MIN_VERSION} CONFIG REQUIRED) + find_package(Arrow ${ICEBERG_ARROW_BUILD_VERSION} CONFIG REQUIRED) + find_package(Parquet ${ICEBERG_ARROW_BUILD_VERSION} CONFIG REQUIRED) list(APPEND ICEBERG_SYSTEM_DEPENDENCIES Arrow Parquet) endif() diff --git a/mkdocs/docs/getting-started.md b/mkdocs/docs/getting-started.md index 92b567b8e7..e67f56b8ba 100644 --- a/mkdocs/docs/getting-started.md +++ b/mkdocs/docs/getting-started.md @@ -44,7 +44,7 @@ Set `-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=OPT_IN` to try installed packages befo fetching sources. Use a fresh build directory when changing this setting. Provided Apache Arrow and Parquet packages must satisfy the minimum version set -by `ICEBERG_ARROW_MIN_VERSION` in `cmake_modules/IcebergThirdpartyToolchain.cmake`. +by `ICEBERG_ARROW_BUILD_VERSION` in `cmake_modules/IcebergThirdpartyToolchain.cmake`. With `OPT_IN`, an unsupported Arrow package is skipped in favor of the pinned sources. If a compatible Arrow package is found, a compatible Parquet package is required; otherwise, CMake configuration fails. diff --git a/src/iceberg/iceberg-config.cmake.in b/src/iceberg/iceberg-config.cmake.in index 8e977cbe0d..fc9c28252f 100644 --- a/src/iceberg/iceberg-config.cmake.in +++ b/src/iceberg/iceberg-config.cmake.in @@ -44,8 +44,8 @@ set(ICEBERG_SYSTEM_DEPENDENCIES "@ICEBERG_SYSTEM_DEPENDENCIES@") # Extra args forwarded to find_dependency() for specific dependencies. set(ICEBERG_FIND_EXTRA_ARGS_AWSSDK "@ICEBERG_FIND_EXTRA_ARGS_AWSSDK@") -set(ICEBERG_FIND_EXTRA_ARGS_Arrow "@ICEBERG_ARROW_MIN_VERSION@;CONFIG") -set(ICEBERG_FIND_EXTRA_ARGS_Parquet "@ICEBERG_ARROW_MIN_VERSION@;CONFIG") +set(ICEBERG_FIND_EXTRA_ARGS_Arrow "@ICEBERG_ARROW_BUILD_VERSION@;CONFIG") +set(ICEBERG_FIND_EXTRA_ARGS_Parquet "@ICEBERG_ARROW_BUILD_VERSION@;CONFIG") include(CMakeFindDependencyMacro) From d45151aeba75e31bf62137949ef19a4bfd5e8034 Mon Sep 17 00:00:00 2001 From: Manu Zhang Date: Thu, 26 Nov 2026 16:19:11 +0800 Subject: [PATCH 5/9] build: preserve CMake's FetchContent lookup default Keep the minimum Arrow and Parquet version checks and document how callers can opt out of installed-package lookup. Co-authored-by: Codex --- CMakeLists.txt | 6 ------ README.md | 10 ++++++---- mkdocs/docs/getting-started.md | 10 ++++++---- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 63ab0036c3..7a9c3b2ff1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,12 +71,6 @@ option(ICEBERG_ENABLE_ASAN "Enable Address Sanitizer" OFF) option(ICEBERG_ENABLE_UBSAN "Enable Undefined Behavior Sanitizer" OFF) include(GNUInstallDirs) -# Use pinned dependency sources unless the caller explicitly enables package lookup. -set(FETCHCONTENT_TRY_FIND_PACKAGE_MODE - NEVER - CACHE STRING "Whether FetchContent should look for installed dependencies") -set_property(CACHE FETCHCONTENT_TRY_FIND_PACKAGE_MODE PROPERTY STRINGS NEVER OPT_IN - ALWAYS) include(FetchContent) set(ICEBERG_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}") diff --git a/README.md b/README.md index f8589de66e..07067c3688 100644 --- a/README.md +++ b/README.md @@ -56,9 +56,11 @@ ctest --test-dir build --output-on-failure ## Build with CMake -Dependencies managed with CMake FetchContent use the pinned sources by default. -Set `-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=OPT_IN` to try installed packages before -fetching sources. Use a fresh build directory when changing this setting. +Iceberg leaves CMake's `FETCHCONTENT_TRY_FIND_PACKAGE_MODE` unchanged. In `OPT_IN` +mode (CMake's default), dependencies that declare package lookup, such as Arrow, +try installed packages before fetching the pinned sources. Set +`-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=NEVER` to skip installed-package lookup in +FetchContent. Use a fresh build directory when changing this setting. ### Build, Run Tests and Install Core Libraries @@ -99,7 +101,7 @@ cmake --install build | Option | Default | Description | |--------|---------|-------------| -| `FETCHCONTENT_TRY_FIND_PACKAGE_MODE` | `NEVER` | Set to `OPT_IN` to try installed FetchContent dependencies before fetching sources | +| `FETCHCONTENT_TRY_FIND_PACKAGE_MODE` | `OPT_IN` (CMake default) | Set to `NEVER` to skip installed-package lookup in FetchContent | | `ICEBERG_BUILD_STATIC` | `ON` | Build static library | | `ICEBERG_BUILD_SHARED` | `OFF` | Build shared library | | `ICEBERG_BUILD_TESTS` | `ON` | Build tests | diff --git a/mkdocs/docs/getting-started.md b/mkdocs/docs/getting-started.md index e67f56b8ba..e7f342f621 100644 --- a/mkdocs/docs/getting-started.md +++ b/mkdocs/docs/getting-started.md @@ -39,9 +39,11 @@ ctest --test-dir build --output-on-failure ## Build with CMake -Dependencies managed with CMake FetchContent use the pinned sources by default. -Set `-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=OPT_IN` to try installed packages before -fetching sources. Use a fresh build directory when changing this setting. +Iceberg leaves CMake's `FETCHCONTENT_TRY_FIND_PACKAGE_MODE` unchanged. In `OPT_IN` +mode (CMake's default), dependencies that declare package lookup, such as Arrow, +try installed packages before fetching the pinned sources. Set +`-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=NEVER` to skip installed-package lookup in +FetchContent. Use a fresh build directory when changing this setting. Provided Apache Arrow and Parquet packages must satisfy the minimum version set by `ICEBERG_ARROW_BUILD_VERSION` in `cmake_modules/IcebergThirdpartyToolchain.cmake`. @@ -78,7 +80,7 @@ cmake --install build | Option | Default | Description | |--------|---------|-------------| -| `FETCHCONTENT_TRY_FIND_PACKAGE_MODE` | `NEVER` | Set to `OPT_IN` to try installed FetchContent dependencies before fetching sources | +| `FETCHCONTENT_TRY_FIND_PACKAGE_MODE` | `OPT_IN` (CMake default) | Set to `NEVER` to skip installed-package lookup in FetchContent | | `ICEBERG_BUILD_STATIC` | `ON` | Build static library | | `ICEBERG_BUILD_SHARED` | `OFF` | Build shared library | | `ICEBERG_BUILD_TESTS` | `ON` | Build tests | From 98b52b6148fe0736938ac2885492430158dd6fa2 Mon Sep 17 00:00:00 2001 From: Manu Zhang Date: Thu, 26 Nov 2026 17:02:12 +0800 Subject: [PATCH 6/9] docs: focus build guidance on Arrow and Parquet minimum versions Co-authored-by: Codex --- README.md | 9 +-------- mkdocs/docs/getting-started.md | 18 ++++-------------- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 07067c3688..12755f65f3 100644 --- a/README.md +++ b/README.md @@ -56,12 +56,6 @@ ctest --test-dir build --output-on-failure ## Build with CMake -Iceberg leaves CMake's `FETCHCONTENT_TRY_FIND_PACKAGE_MODE` unchanged. In `OPT_IN` -mode (CMake's default), dependencies that declare package lookup, such as Arrow, -try installed packages before fetching the pinned sources. Set -`-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=NEVER` to skip installed-package lookup in -FetchContent. Use a fresh build directory when changing this setting. - ### Build, Run Tests and Install Core Libraries ```bash @@ -91,7 +85,7 @@ cmake --install build #### Provided Apache Arrow ```bash -cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install -DCMAKE_PREFIX_PATH=/path/to/arrow -DICEBERG_BUILD_BUNDLE=ON -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=OPT_IN +cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install -DCMAKE_PREFIX_PATH=/path/to/arrow -DICEBERG_BUILD_BUNDLE=ON cmake --build build ctest --test-dir build --output-on-failure cmake --install build @@ -101,7 +95,6 @@ cmake --install build | Option | Default | Description | |--------|---------|-------------| -| `FETCHCONTENT_TRY_FIND_PACKAGE_MODE` | `OPT_IN` (CMake default) | Set to `NEVER` to skip installed-package lookup in FetchContent | | `ICEBERG_BUILD_STATIC` | `ON` | Build static library | | `ICEBERG_BUILD_SHARED` | `OFF` | Build shared library | | `ICEBERG_BUILD_TESTS` | `ON` | Build tests | diff --git a/mkdocs/docs/getting-started.md b/mkdocs/docs/getting-started.md index e7f342f621..9f80489867 100644 --- a/mkdocs/docs/getting-started.md +++ b/mkdocs/docs/getting-started.md @@ -39,18 +39,6 @@ ctest --test-dir build --output-on-failure ## Build with CMake -Iceberg leaves CMake's `FETCHCONTENT_TRY_FIND_PACKAGE_MODE` unchanged. In `OPT_IN` -mode (CMake's default), dependencies that declare package lookup, such as Arrow, -try installed packages before fetching the pinned sources. Set -`-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=NEVER` to skip installed-package lookup in -FetchContent. Use a fresh build directory when changing this setting. - -Provided Apache Arrow and Parquet packages must satisfy the minimum version set -by `ICEBERG_ARROW_BUILD_VERSION` in `cmake_modules/IcebergThirdpartyToolchain.cmake`. -With `OPT_IN`, an unsupported Arrow package is skipped in favor of the pinned sources. -If a compatible Arrow package is found, a compatible Parquet package is required; -otherwise, CMake configuration fails. - ### Core Libraries ```bash @@ -70,8 +58,11 @@ cmake --install build ### Bundle Library (with provided Apache Arrow) +Provided Arrow and Parquet packages must meet the minimum version set by +`ICEBERG_ARROW_BUILD_VERSION`. + ```bash -cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install -DCMAKE_PREFIX_PATH=/path/to/arrow -DICEBERG_BUILD_BUNDLE=ON -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=OPT_IN +cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install -DCMAKE_PREFIX_PATH=/path/to/arrow -DICEBERG_BUILD_BUNDLE=ON cmake --build build cmake --install build ``` @@ -80,7 +71,6 @@ cmake --install build | Option | Default | Description | |--------|---------|-------------| -| `FETCHCONTENT_TRY_FIND_PACKAGE_MODE` | `OPT_IN` (CMake default) | Set to `NEVER` to skip installed-package lookup in FetchContent | | `ICEBERG_BUILD_STATIC` | `ON` | Build static library | | `ICEBERG_BUILD_SHARED` | `OFF` | Build shared library | | `ICEBERG_BUILD_TESTS` | `ON` | Build tests | From f537d574f165f8c78c24750930a34574cf6bd79f Mon Sep 17 00:00:00 2001 From: Manu Zhang Date: Thu, 26 Nov 2026 17:26:18 +0800 Subject: [PATCH 7/9] docs: show how to select vendored or installed Arrow Co-authored-by: Codex --- mkdocs/docs/getting-started.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mkdocs/docs/getting-started.md b/mkdocs/docs/getting-started.md index 9f80489867..0765106604 100644 --- a/mkdocs/docs/getting-started.md +++ b/mkdocs/docs/getting-started.md @@ -51,7 +51,7 @@ cmake --install build ### Bundle Library (with vendored dependencies) ```bash -cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install -DICEBERG_BUILD_BUNDLE=ON +cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install -DICEBERG_BUILD_BUNDLE=ON -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=NEVER cmake --build build cmake --install build ``` @@ -59,10 +59,11 @@ cmake --install build ### Bundle Library (with provided Apache Arrow) Provided Arrow and Parquet packages must meet the minimum version set by -`ICEBERG_ARROW_BUILD_VERSION`. +`ICEBERG_ARROW_BUILD_VERSION`. With `OPT_IN`, CMake tries installed Arrow first +and falls back to the pinned source if no compatible Arrow is found. ```bash -cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install -DCMAKE_PREFIX_PATH=/path/to/arrow -DICEBERG_BUILD_BUNDLE=ON +cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install -DCMAKE_PREFIX_PATH=/path/to/arrow -DICEBERG_BUILD_BUNDLE=ON -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=OPT_IN cmake --build build cmake --install build ``` From f43face9736760ef9059333e991db924e61e314c Mon Sep 17 00:00:00 2001 From: Manu Zhang Date: Thu, 26 Nov 2026 17:29:22 +0800 Subject: [PATCH 8/9] docs: explain when to force vendored Arrow Co-authored-by: Codex --- mkdocs/docs/getting-started.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mkdocs/docs/getting-started.md b/mkdocs/docs/getting-started.md index 0765106604..c6349e34be 100644 --- a/mkdocs/docs/getting-started.md +++ b/mkdocs/docs/getting-started.md @@ -50,6 +50,9 @@ cmake --install build ### Bundle Library (with vendored dependencies) +To build Arrow from source even when it is already installed, set +`FETCHCONTENT_TRY_FIND_PACKAGE_MODE=NEVER` to skip FetchContent's installed-package lookup. + ```bash cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install -DICEBERG_BUILD_BUNDLE=ON -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=NEVER cmake --build build From 2bacef8e9273e8fee0cd1dc3a31dec4aa5ac902a Mon Sep 17 00:00:00 2001 From: Manu Zhang Date: Thu, 26 Nov 2026 17:40:50 +0800 Subject: [PATCH 9/9] docs: omit the default FetchContent mode from the build example Co-authored-by: Codex --- mkdocs/docs/getting-started.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mkdocs/docs/getting-started.md b/mkdocs/docs/getting-started.md index c6349e34be..28c27fe1bb 100644 --- a/mkdocs/docs/getting-started.md +++ b/mkdocs/docs/getting-started.md @@ -62,11 +62,10 @@ cmake --install build ### Bundle Library (with provided Apache Arrow) Provided Arrow and Parquet packages must meet the minimum version set by -`ICEBERG_ARROW_BUILD_VERSION`. With `OPT_IN`, CMake tries installed Arrow first -and falls back to the pinned source if no compatible Arrow is found. +`ICEBERG_ARROW_BUILD_VERSION`. ```bash -cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install -DCMAKE_PREFIX_PATH=/path/to/arrow -DICEBERG_BUILD_BUNDLE=ON -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=OPT_IN +cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install -DCMAKE_PREFIX_PATH=/path/to/arrow -DICEBERG_BUILD_BUNDLE=ON cmake --build build cmake --install build ```