[clang-tools-extra] 7359314 - [cmake] do not set execution permission to regular files.
Lin Sinan via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 6 20:05:21 PDT 2022
Author: Sinan Lin
Date: 2022-09-07T11:04:12+08:00
New Revision: 73593145cb5b6bbb474e2c53153aabdb362731d5
URL: https://github.com/llvm/llvm-project/commit/73593145cb5b6bbb474e2c53153aabdb362731d5
DIFF: https://github.com/llvm/llvm-project/commit/73593145cb5b6bbb474e2c53153aabdb362731d5.diff
LOG: [cmake] do not set execution permission to regular files.
some regular files(e.g. files have no shebang and no execute
bit in source dir) are wrongly assigned an execution permission,
such as scanview.css and ear.c from libscanbuild, which is
unnecessary and introduces warnings in some envs.
Reviewed By: MaskRay, phosek
Differential Revision: https://reviews.llvm.org/D133308
Added:
Modified:
clang-tools-extra/clang-include-fixer/tool/CMakeLists.txt
clang/CMakeLists.txt
clang/tools/clang-format/CMakeLists.txt
clang/tools/clang-rename/CMakeLists.txt
clang/tools/scan-build-py/CMakeLists.txt
Removed:
################################################################################
diff --git a/clang-tools-extra/clang-include-fixer/tool/CMakeLists.txt b/clang-tools-extra/clang-include-fixer/tool/CMakeLists.txt
index 5b9e00ab87cd8..81ff00c09c2aa 100644
--- a/clang-tools-extra/clang-include-fixer/tool/CMakeLists.txt
+++ b/clang-tools-extra/clang-include-fixer/tool/CMakeLists.txt
@@ -20,9 +20,9 @@ target_link_libraries(clang-include-fixer
findAllSymbols
)
-install(PROGRAMS clang-include-fixer.el
+install(FILES clang-include-fixer.el
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
COMPONENT clang-include-fixer)
-install(PROGRAMS clang-include-fixer.py
+install(FILES clang-include-fixer.py
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
COMPONENT clang-include-fixer)
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index 1064cfd0a35a3..02ce5de4652de 100644
--- a/clang/CMakeLists.txt
+++ b/clang/CMakeLists.txt
@@ -418,7 +418,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
endif()
add_custom_target(bash-autocomplete DEPENDS utils/bash-autocomplete.sh)
- install(PROGRAMS utils/bash-autocomplete.sh
+ install(FILES utils/bash-autocomplete.sh
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
COMPONENT bash-autocomplete)
if(NOT LLVM_ENABLE_IDE)
diff --git a/clang/tools/clang-format/CMakeLists.txt b/clang/tools/clang-format/CMakeLists.txt
index bbdef93b576b8..30c93f8667c83 100644
--- a/clang/tools/clang-format/CMakeLists.txt
+++ b/clang/tools/clang-format/CMakeLists.txt
@@ -20,19 +20,19 @@ if( LLVM_LIB_FUZZING_ENGINE OR LLVM_USE_SANITIZE_COVERAGE )
add_subdirectory(fuzzer)
endif()
-install(PROGRAMS clang-format-bbedit.applescript
+install(FILES clang-format-bbedit.applescript
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
COMPONENT clang-format)
install(PROGRAMS clang-format-
diff .py
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
COMPONENT clang-format)
-install(PROGRAMS clang-format-sublime.py
+install(FILES clang-format-sublime.py
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
COMPONENT clang-format)
-install(PROGRAMS clang-format.el
+install(FILES clang-format.el
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
COMPONENT clang-format)
-install(PROGRAMS clang-format.py
+install(FILES clang-format.py
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
COMPONENT clang-format)
install(PROGRAMS git-clang-format
diff --git a/clang/tools/clang-rename/CMakeLists.txt b/clang/tools/clang-rename/CMakeLists.txt
index 58da000272f6a..f4c4e520520d9 100644
--- a/clang/tools/clang-rename/CMakeLists.txt
+++ b/clang/tools/clang-rename/CMakeLists.txt
@@ -18,9 +18,9 @@ clang_target_link_libraries(clang-rename
clangToolingRefactoring
)
-install(PROGRAMS clang-rename.py
+install(FILES clang-rename.py
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
COMPONENT clang-rename)
-install(PROGRAMS clang-rename.el
+install(FILES clang-rename.el
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
COMPONENT clang-rename)
diff --git a/clang/tools/scan-build-py/CMakeLists.txt b/clang/tools/scan-build-py/CMakeLists.txt
index a087f87974cb8..3aca22c0b0a8d 100644
--- a/clang/tools/scan-build-py/CMakeLists.txt
+++ b/clang/tools/scan-build-py/CMakeLists.txt
@@ -87,7 +87,7 @@ foreach(lib ${LibScanbuild})
${CMAKE_BINARY_DIR}/lib/libscanbuild/
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/${lib})
list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/${lib})
- install(PROGRAMS lib/libscanbuild/${lib}
+ install(FILES lib/libscanbuild/${lib}
DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libscanbuild
COMPONENT scan-build-py)
endforeach()
@@ -105,7 +105,7 @@ foreach(resource ${LibScanbuildResources})
${CMAKE_BINARY_DIR}/lib/libscanbuild/resources
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/resources/${resource})
list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/resources/${resource})
- install(PROGRAMS lib/libscanbuild/resources/${resource}
+ install(FILES lib/libscanbuild/resources/${resource}
DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libscanbuild/resources
COMPONENT scan-build-py)
endforeach()
@@ -121,7 +121,7 @@ foreach(lib ${LibEar})
${CMAKE_BINARY_DIR}/lib/libear/
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libear/${lib})
list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libear/${lib})
- install(PROGRAMS lib/libear/${lib}
+ install(FILES lib/libear/${lib}
DESTINATION lib${CLANG_LIBDIR_SUFFIX}/libear
COMPONENT scan-build-py)
endforeach()
More information about the cfe-commits
mailing list