Skip to content

build: avoid duplicate libraries in the C++20 compatibility test - #1015

Merged
wgtmac merged 1 commit into
apache:mainfrom
wgtmac:codex/cpp20-linker-warning
Oct 15, 2026
Merged

wgtmac merged 1 commit into
apache:mainfrom
wgtmac:codex/cpp20-linker-warning

Conversation

@wgtmac

@wgtmac wgtmac commented Oct 14, 2026

Copy link
Copy Markdown
Member

The C++20 compatibility test links core/data libraries both directly and through optional components, which can produce duplicate-library warnings on macOS.

Enable CMP0156 and CMP0179 when available, scoped to this test. CMake can then de-duplicate libraries where the linker supports it and keep the first static-library occurrence. Older CMake versions keep the existing behavior. Dependencies and public-header coverage are unchanged; no warning is suppressed.

Validation: pre-commit and git diff --check passed. No build or tests were run, as requested.

Copilot AI balanced review requested due to automatic review settings October 14, 2026 05:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

0 open findings

What changed in this PR

Scopes CMake policy changes to the C++20 compatibility test to allow CMake to de-duplicate duplicate-linked libraries (avoiding macOS linker warnings) without affecting other targets or requiring newer CMake versions.

Changes:

  • Pushes a CMake policy scope for the C++20 compatibility test.
  • Enables CMP0156 and CMP0179 when available to allow link-library de-duplication / first-static behavior.
  • Pops the policy scope at the end of the test target configuration.
File Description
src/​iceberg/​test/​CMakeLists.txt Adds scoped CMake policy changes (CMP0156/CMP0179) around the C++20 compatibility test target to reduce duplicate-library warnings.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@zhjwpku zhjwpku left a comment

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.

+1

@wgtmac

wgtmac commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

Thanks all for the review!

@wgtmac
wgtmac merged commit f8eca4f into apache:main Oct 15, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants