Skip to content

Refactor CMake Ice package handling into modules#745

Merged
externl merged 5 commits intozeroc-ice:mainfrom
externl:split-common-cmake
Mar 13, 2026
Merged

Refactor CMake Ice package handling into modules#745
externl merged 5 commits intozeroc-ice:mainfrom
externl:split-common-cmake

Conversation

@externl
Copy link
Copy Markdown
Member

@externl externl commented Mar 12, 2026

Split Windows Ice NuGet and PDB out of common.cmake.

  • Extract NuGet package download logic to ice-nuget.cmake
  • Extract PDB download and copy logic to ice-pdbs.cmake
  • Remove download-ice-pdbs.cmake (functionality merged into ice-pdbs.cmake)
  • Use cmake_path for better path handling in copy-ice-pdbs.cmake
  • Improve error handling with temporary directory cleanup on failure

Split Windows Ice NuGet and PDB handling into separate modules:
- Extract NuGet package download logic to ice-nuget.cmake
- Extract PDB download and copy logic to ice-pdbs.cmake
- Remove download-ice-pdbs.cmake (functionality merged into ice-pdbs.cmake)
- Use cmake_path for better path handling in copy-ice-pdbs.cmake
- Improve error handling with temporary directory cleanup on failure
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the Windows-specific Ice CMake support by extracting NuGet package setup and PDB download/copy logic out of common.cmake into dedicated modules, and modernizes some path handling.

Changes:

  • Add ice-nuget.cmake to download/configure the Ice NuGet package on Windows and set Ice_ROOT / Ice_NUGET_VERSION.
  • Add ice-pdbs.cmake to download/extract Ice PDBs at configure time and provide ice_copy_pdbs() for build-time copying.
  • Remove the old download-ice-pdbs.cmake and update copy-ice-pdbs.cmake to use cmake_path.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
cpp/cmake/ice-pdbs.cmake New module to download/extract PDBs and define ice_copy_pdbs()
cpp/cmake/ice-nuget.cmake New module to acquire nuget.exe, install Ice NuGet, and set Ice_ROOT
cpp/cmake/download-ice-pdbs.cmake Removed; functionality moved into ice-pdbs.cmake
cpp/cmake/copy-ice-pdbs.cmake Uses cmake_path(GET ... STEM ...) for DLL name extraction
cpp/cmake/common.cmake Includes the new modules and removes inlined NuGet/PDB logic

You can also share your feedback on Copilot code review. Take the survey.

Comment thread cpp/cmake/common.cmake Outdated
Comment thread cpp/cmake/ice-nuget.cmake
Comment thread cpp/cmake/ice-nuget.cmake
Comment thread cpp/cmake/ice-pdbs.cmake Outdated
Comment thread cpp/cmake/ice-pdbs.cmake Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.


You can also share your feedback on Copilot code review. Take the survey.

Comment thread cpp/cmake/ice-nuget.cmake
Comment thread cpp/cmake/ice-pdbs.cmake
Comment thread cpp/cmake/ice-pdbs.cmake


option(ICE_COPY_PDB "Download and copy Ice PDB files alongside DLLs" OFF)
if(ICE_COPY_PDB)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do you know how CMake handle parallel builds here?

@externl externl merged commit 474123b into zeroc-ice:main Mar 13, 2026
25 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.

4 participants