Skip to content

[salome-med-fichier] Tolerate spaces in paths. - #51901

Merged
Victor Romero (vicroms) merged 2 commits into
microsoft:masterfrom
BillyONeal:salome-med-fichier-spaces
May 22, 2026
Merged

[salome-med-fichier] Tolerate spaces in paths.#51901
Victor Romero (vicroms) merged 2 commits into
microsoft:masterfrom
BillyONeal:salome-med-fichier-spaces

Conversation

@BillyONeal

@BillyONeal Billy O'Neal (BillyONeal) commented May 21, 2026

Copy link
Copy Markdown
Member

Other changes:

  • Merge the HDF5 patches together.
  • Change "comment out" patch changes into deletions to reduce the patch size.
  • Rename "other fixes" patch to describe what it does.
  • Use file(INSTALL rather than execute_process(${CMAKE_COMMAND} -E copy. (This made getting logs for what happened easier because it's only 1 level of stacking rather than 2.)

Other changes:
* Merge the HDF5 patches together.
* Change "comment out" patch changes into deletions to reduce the patch size.
* Rename "other fixes" patch to describe what it does.
INSTALL(PROGRAMS ${PROJECT_BINARY_DIR}/xmdump2 ${PROJECT_BINARY_DIR}/xmdump3 ${PROJECT_BINARY_DIR}/xmdump4 DESTINATION bin)
-INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink mdump4 mdump WORKING_DIRECTORY ${DESTDIR}${CMAKE_INSTALL_PREFIX}/bin)")
-INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink xmdump4 xmdump WORKING_DIRECTORY ${DESTDIR}${CMAKE_INSTALL_PREFIX}/bin)")
+INSTALL(CODE "FILE(INSTALL \"${DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/mdump4${CMAKE_EXECUTABLE_SUFFIX}\" DESTINATION \"${DESTDIR}${CMAKE_INSTALL_PREFIX}/bin\" RENAME \"mdump${CMAKE_EXECUTABLE_SUFFIX}\")")

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.

I considered COPY_FILE which would have been clearer but that needs CMake 3.21+ and we support 3.18 (for now)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

AFAIU you can safely assume a recent version of CMake when INSTALL happens during port build (with vcpkg controlled CMake). Using exported or cached binary artifacts is where the low end matters. (And then there is upstreaming...)

@BillyONeal Billy O'Neal (BillyONeal) May 22, 2026

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.

I wasn't positive in which context INSTALL(CODE ran so I decided to be paranoid.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the salome-med-fichier port to better tolerate tool paths containing spaces (notably during CMake install-time scripting), while also consolidating/renaming patching to reduce patch size and complexity.

Changes:

  • Bump salome-med-fichier to port-version: 4 and update the versions database entries accordingly.
  • Replace install-time symlink creation / unquoted tool invocations with more robust quoting and install-time copy/rename logic.
  • Consolidate HDF5-related patching (merge prior patches) and add Windows <io.h> includes where needed.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
versions/s-/salome-med-fichier.json Adds the new port-version: 4 git-tree entry for salome-med-fichier.
versions/baseline.json Updates the baseline for salome-med-fichier to port-version: 4.
ports/salome-med-fichier/vcpkg.json Bumps the port’s port-version to 4.
ports/salome-med-fichier/portfile.cmake Switches to the new patch set (merged/renamed) and applies the new install-path quoting patch.
ports/salome-med-fichier/quote-paths-in-install-code.diff Quotes PYTHON_EXECUTABLE during install-time execution and replaces symlink creation with FILE(INSTALL ... RENAME ...).
ports/salome-med-fichier/include-io.patch Adds <io.h> includes for Windows builds.
ports/salome-med-fichier/hdf5.patch Consolidates HDF5 adjustments and updates multiple HDF5 API calls/types for compatibility.
ports/salome-med-fichier/hdf5-2.patch Removes the now-redundant second HDF5 patch after consolidation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ports/salome-med-fichier/quote-paths-in-install-code.diff
@vicroms
Victor Romero (vicroms) enabled auto-merge (squash) May 22, 2026 07:35
@vicroms
Victor Romero (vicroms) merged commit 22d9c65 into microsoft:master May 22, 2026
16 checks passed
@BillyONeal
Billy O'Neal (BillyONeal) deleted the salome-med-fichier-spaces branch May 22, 2026 22:35
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