[PATCH] D31696: Automatically add include-what-you-use for when building in tree

Zachary Turner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 4 19:11:01 PDT 2017


zturner created this revision.
Herald added subscribers: mgorny, rengolin, aemerson.

It's a little bit annoying to have to manually edit files and then deal with git thinking that you've got untracked files, and thusly deleting them when you run `git clean -fd`.  Although this is not an officially sanctioned LLVM tool, there seems to be little harm in having this logic here and it makes life easier for anyone who wants to use this.


https://reviews.llvm.org/D31696

Files:
  clang/tools/.gitignore
  clang/tools/CMakeLists.txt


Index: clang/tools/CMakeLists.txt
===================================================================
--- clang/tools/CMakeLists.txt
+++ clang/tools/CMakeLists.txt
@@ -30,3 +30,8 @@
 
 # libclang may require clang-tidy in clang-tools-extra.
 add_clang_subdirectory(libclang)
+
+# if include-what-you-use is cloned for building in-tree, add it here.
+if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/include-what-you-use")
+  add_clang_subdirectory(include-what-you-use)
+endif()
Index: clang/tools/.gitignore
===================================================================
--- /dev/null
+++ clang/tools/.gitignore
@@ -0,0 +1,13 @@
+#==============================================================================#
+# This file specifies intentionally untracked files that git should ignore.
+# See: http://www.kernel.org/pub/software/scm/git/docs/gitignore.html
+#
+# This file is intentionally different from the output of `git svn show-ignore`,
+# as most of those are useless.
+#==============================================================================#
+
+#==============================================================================#
+# File extensions to be ignored anywhere in the tree.
+#==============================================================================#
+# The include-what-you-use project, for when building in-tree.
+include-what-you-use


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31696.94156.patch
Type: text/x-patch
Size: 1363 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170405/1d3d596d/attachment.bin>


More information about the cfe-commits mailing list