Skip to content
Open
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
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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 |
Expand Down
7 changes: 6 additions & 1 deletion mkdocs/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering when user set this to OPT_IN with a unsupported installed package, will it pass the cmake configuration phase? If yes, should we error out earlier by adding versions to FIND_PACKAGE_ARGS?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there consensus that Arrow 25 is the minimum supported version? cc @wgtmac

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'll need to enforce a minimum Arrow version, as features support depend on recent upstream changes, variant is an example.

fetching sources. Use a fresh build directory when changing this setting.

### Core Libraries

```bash
Expand All @@ -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
```
Expand All @@ -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 |
Expand Down
Loading