You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And then these strings are appended to the PATCH_COMMAND argument for hand-off to a downstream function (FetchContent?).
This assumes that the PATCH_COMMAND executor is a shell that understands things like &&, which apparently is not always the case.
After looking at CMake docs, I hacked together a basic workaround which appears to work. CMake apparently allows issuing multiple commands for the PATCH_COMMAND as long as you declare COMMAND for each subsequent command after the first:
In CI environments, whenever my
CPMAddPackage
commandhas
PATCHES
set with multiple files, I get an errorThis occurs because in function
cpm_add_patches
, the patch command is built by concatenatinga bunch of strings like
And then these strings are appended to the
PATCH_COMMAND
argument for hand-off to a downstream function (FetchContent?).This assumes that the
PATCH_COMMAND
executor is a shell that understands things like&&
, which apparently is not always the case.After looking at CMake docs, I hacked together a basic workaround which appears to work. CMake apparently allows issuing multiple commands for the
PATCH_COMMAND
as long as you declareCOMMAND
for each subsequent command after the first:The text was updated successfully, but these errors were encountered: