Skip to content

Simplify DLL copying logic for test and docs on MSVC systems - #8244

Merged
poshul merged 4 commits into
developfrom
jpfeuffer-patch-10
Oct 3, 2025
Merged

poshul merged 4 commits into
developfrom
jpfeuffer-patch-10

Conversation

@jpfeuffer

@jpfeuffer jpfeuffer commented Oct 2, 2025 •

Copy link
Copy Markdown
Contributor

Description

@poshul Maybe that works. Who knows.

Summary by CodeRabbit

  • Bug Fixes
    • Ensures required runtime DLLs are consistently included in Windows builds for apps and tests, reducing “missing DLL” errors; copying to documentation outputs is now conditional.
  • Chores
    • Standardizes per-target post-build DLL handling on Windows and adds an ENABLE_DOCS option to control whether runtime DLLs are copied into documentation artifacts.

@coderabbitai

coderabbitai Bot commented Oct 2, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

Replaces older CMake-version-gated DLL copying with a per-target Windows post-build that copies runtime DLLs to output and test folders by default; copying to the documentation folder is now conditional on a new ENABLE_DOCS option. Apple/clang adjustments and comments/TODOs retained.

Changes

Cohort / File(s) Summary
CMake Windows DLL post-build handling
cmake/add_library_macros.cmake
Remove CMake-version gating and the unconditional extern-bin DLL copy; keep copying target DLLs, collect dependency runtime DLLs on WIN32 and copy to output and test folders; add ENABLE_DOCS-guarded post-build path to copy runtime DLLs to documentation folder; retain Apple/clang tweaks and add comments/TODOs about doc copy placement.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant CMake as CMake (configure)
  participant Target as Library Target
  participant FS as File System

  CMake->>Target: add post-build commands (WIN32 only)
  Note right of Target #DDEEFF: Default per-target post-build actions
  Target->>FS: copy runtime DLLs -> output folder
  Target->>FS: copy runtime DLLs -> test folder

  alt ENABLE_DOCS == ON
    Note right of Target #E6FFE6: Docs copy enabled via post-build
    Target->>FS: copy runtime DLLs -> documentation folder
  end

  Note over Target,FS: Apple/clang-specific adjustments applied where relevant
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I nibble CMake corners, quick and neat,
Moving DLLs so builds stay complete,
Outputs and tests receive their share,
Docs get copies only if you care.
🐇

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit's high-level summary is enabled.
Title Check ✅ Passed The title accurately describes the primary change—simplifying DLL copy logic for tests and documentation on MSVC—and is concise, clear, and directly related to the modifications in cmake/add_library_macros.cmake.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch jpfeuffer-patch-10

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4b27df4 and c5dbaa6.

📒 Files selected for processing (1)
  • cmake/add_library_macros.cmake (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • cmake/add_library_macros.cmake
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: build-and-test (windows-2022, cl.exe, 14.36)
  • GitHub Check: build-and-test (ubuntu-22.04, clang++, 15)
  • GitHub Check: build-and-test (macos-15-intel, xcode, 16.0.0)
  • GitHub Check: build-and-test (ubuntu-22.04, g++, 11)
  • GitHub Check: build-and-test (macos-26, xcode, 26)
  • GitHub Check: cppcheck-test

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

only copy if with docs. make dir first.
@jpfeuffer

Copy link
Copy Markdown
Contributor Author

You get the idea. But it's a waste of time trying this on GHA.
I never know which dll is missing etc.

@poshul
poshul merged commit 112b28f into develop Oct 3, 2025
@poshul
poshul deleted the jpfeuffer-patch-10 branch October 3, 2025 13:13
Copilot AI added a commit that referenced this pull request Oct 9, 2025
- Extend DLL copying logic to handle Arrow/Parquet and transitive dependencies
- Add support for abseil, aws-cpp-sdk, brotli, crc32c, and other Arrow deps
- Use glob patterns to be robust to future version changes
- Mirror approach from PR #8244 for other dependencies
- Copy DLLs to output, test, and doc directories when WITH_PARQUET is enabled

Co-authored-by: poshul <[email protected]>
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.

2 participants