aboutsummaryrefslogtreecommitdiff
path: root/clang/cmake/modules
diff options
context:
space:
mode:
authorSebastian Neubauer <Sebastian.Neubauer@amd.com>2022-07-22 11:31:20 +0200
committerSebastian Neubauer <Sebastian.Neubauer@amd.com>2022-07-25 10:47:04 +0200
commitefe1527e28ca45d2217d874364a1197de6ec156d (patch)
tree0e0359d1c9b2571ffc1952f21a2583a0684cb5c9 /clang/cmake/modules
parent7ec308715c6ec0d07e62f7b2f8503cccacf9e96e (diff)
downloadllvm-efe1527e28ca45d2217d874364a1197de6ec156d.zip
llvm-efe1527e28ca45d2217d874364a1197de6ec156d.tar.gz
llvm-efe1527e28ca45d2217d874364a1197de6ec156d.tar.bz2
[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
Diffstat (limited to 'clang/cmake/modules')
-rw-r--r--clang/cmake/modules/CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/cmake/modules/CMakeLists.txt b/clang/cmake/modules/CMakeLists.txt
index c6afdab..5d41661 100644
--- a/clang/cmake/modules/CMakeLists.txt
+++ b/clang/cmake/modules/CMakeLists.txt
@@ -32,7 +32,8 @@ set(CLANG_CONFIG_LLVM_CMAKE_DIR)
# For compatibility with projects that include(ClangConfig)
# via CMAKE_MODULE_PATH, place API modules next to it.
-# Copy without source permissions because the source could be read-only
+# Copy without source permissions because the source could be read-only,
+# but we need to write into the copied folder.
file(COPY .
DESTINATION ${clang_cmake_builddir}
NO_SOURCE_PERMISSIONS