sinan created this revision. sinan added reviewers: MaskRay, phosek, DavidSpickett. Herald added subscribers: StephenFan, whisperity, mgorny. Herald added a reviewer: NoQ. Herald added a project: All. sinan requested review of this revision. Herald added projects: clang, clang-tools-extra. Herald added a subscriber: cfe-commits.
some regular files(e.g. files that have no shebang and no execute bit in source dir) are wrongly assigned execution permission through cmake install, such as scanview.css and ear.c from libscanbuild, which is unnecessary and introduces warnings in some platforms: install(PROGRAMS ...) is identical to the install(FILES ...) except that the default permissions for the installed file also include OWNER_EXECUTE, GROUP_EXECUTE, and WORLD_EXECUTE. (https://cmake.org/cmake/help/latest/command/install.html#installing-files) Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D133308 Files: 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
Index: clang/tools/scan-build-py/CMakeLists.txt =================================================================== --- clang/tools/scan-build-py/CMakeLists.txt +++ clang/tools/scan-build-py/CMakeLists.txt @@ -87,7 +87,7 @@ ${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 @@ ${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 @@ ${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() Index: clang/tools/clang-rename/CMakeLists.txt =================================================================== --- clang/tools/clang-rename/CMakeLists.txt +++ clang/tools/clang-rename/CMakeLists.txt @@ -18,9 +18,9 @@ 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) Index: clang/tools/clang-format/CMakeLists.txt =================================================================== --- clang/tools/clang-format/CMakeLists.txt +++ clang/tools/clang-format/CMakeLists.txt @@ -20,19 +20,19 @@ 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 Index: clang/CMakeLists.txt =================================================================== --- clang/CMakeLists.txt +++ clang/CMakeLists.txt @@ -418,7 +418,7 @@ 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) Index: clang-tools-extra/clang-include-fixer/tool/CMakeLists.txt =================================================================== --- clang-tools-extra/clang-include-fixer/tool/CMakeLists.txt +++ clang-tools-extra/clang-include-fixer/tool/CMakeLists.txt @@ -20,9 +20,9 @@ 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)
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits