file(COPY): PERMISSIONS requires PATTERN or REGEX
When calling:
file(COPY ${SOURCE_DIR} DESTINATION ${TARGET_DIR} PERMISSIONS GROUP_READ)
You will get: file option PERMISSIONS may not appear before PATTERN or REGEX.
I think this makes no sense, because I would expect a similar behavior as file(CHMOD)
has.
The documentation (btw: the keyword PERMISSIONS
is not correctly highlighted there) refers to install(Directory)
, But I don't see any reference anywhere in the documentation there as to why PATTERN
or REGEX
are required for PERMISSIONS
.
// Edit: Ah, it is a bot confusing: The signatures shows that PERMISSIONS
requires the other values. I think it would make sense to make PATTERN
and REGEX
optional so it can be used similar to file(CHMOD)
Edited by SunBlack