[CMake] Copy folder without permissions
authorSebastian Neubauer <Sebastian.Neubauer@amd.com>
Fri, 22 Jul 2022 09:31:20 +0000 (11:31 +0200)
committerSebastian Neubauer <Sebastian.Neubauer@amd.com>
Mon, 25 Jul 2022 08:47:04 +0000 (10:47 +0200)
commitefe1527e28ca45d2217d874364a1197de6ec156d
tree0e0359d1c9b2571ffc1952f21a2583a0684cb5c9
parent7ec308715c6ec0d07e62f7b2f8503cccacf9e96e
[CMake] Copy folder without permissions

Copying the folder keeps the original permissions by default. This
creates problems when the source folder is read-only, e.g. in a
packaging environment.
Then, the copied folder in the build directory is read-only as well.
Later on, other files are copied into that directory (in the build
tree), failing when the directory is read-only.

Fix that problem by copying the folder without keeping the original
permissions.

Follow-up to D130254.

Differential Revision: https://reviews.llvm.org/D130338
clang/cmake/modules/CMakeLists.txt
llvm/cmake/modules/CMakeLists.txt
mlir/cmake/modules/CMakeLists.txt