Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "cpm_add_patches" handling of multiple patch commands #652

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

christopherbate
Copy link

@christopherbate christopherbate commented Mar 4, 2025

Update "cpm_add_patches" to correctly handle multiple patch files. The "PATCH_COMMAND" executor may not be a shell, so it is not portable to use shell operators like "&&" and "<" in the command. Commands after the initial PATCH_COMMAND should nstead be prefixed by COMMAND, and we can use "-i" to specify that a file is used by the "patch" command.

Resolves #651

Update "cpm_add_patches" to correctly handle multiple patch
files. The "PATCH_COMMAND" executor may not be a shell, so
it is not portable to use shell operators like "&&" and "<"
in the command. Commands after the initial PATCH_COMMAND
should nstead be prefixed by COMMAND, and we can use "-i"
to specify that a file is used by the "patch" command.
@christopherbate
Copy link
Author

@TheLartians can you review or can you approve workflows?

Copy link
Member

@TheLartians TheLartians left a comment

Choose a reason for hiding this comment

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

Thanks for the ping and fix! The changes look fine, but may require running cmake-format (see the project;s styleguide). Also do you think you could add / modify a test case to ensure multiple patches work as expected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants