cmake uniform behavior in copying files, folders, and symbolic links

Hi,

Using “file(copy …)” in cmake files is different behavior than “cmake -E copy” command.
Especially for linux when copying folders which have symbolic links pointing outside the folder, the “file(copy …)” command can’t copy them (problems with symbolic links, too many levels of…). However “cmake -E copy” does this job (it resolves links and copy the content)!
So having consistent behavior would be nice.
Also having the opportunity to preserve time stamps at copy in the “cmake -E copy” command would be nice.
Furthermore an windows option to generate “dos short names” would be helpful.

Thanks in advance and best regards
Frank

file(COPY) is basically a quiet file(INSTALL) and as such is…poorly named. There’s not much to be done about it today though. There is file(COPY_FILE) for single file copying, but we’d need a new signature (COPY_RECURSIVE?) for recursive copying. Adding flags to -E copy is fine and would be a new feature request.