[llvm] [CMake] Add an uninstall target (PR #220549)

Bill Wendling via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 17 18:46:28 PDT 2026


================
@@ -1584,6 +1584,18 @@ llvm_distribution_add_targets()
 process_llvm_pass_plugins(GEN_CONFIG)
 include(CoverageReport)
 
+# Guarded so that this doesn't collide with an "uninstall" target some other
+# project already defines, in builds that embed LLVM as a subdirectory.
+if(NOT TARGET uninstall)
+  configure_file(
+    "${LLVM_CMAKE_DIR}/cmake_uninstall.cmake.in"
+    "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
+    @ONLY)
+  add_custom_target(uninstall
+    COMMAND "${CMAKE_COMMAND}" -P
+            "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
+endif()
----------------
isanbard wrote:

Done.

https://github.com/llvm/llvm-project/pull/220549


More information about the llvm-commits mailing list