summaryrefslogtreecommitdiff
path: root/cmake/modules/ClangConfig.cmake.in
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/modules/ClangConfig.cmake.in')
-rw-r--r--cmake/modules/ClangConfig.cmake.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/modules/ClangConfig.cmake.in b/cmake/modules/ClangConfig.cmake.in
index 03bca691c2b64..a5a7eae503282 100644
--- a/cmake/modules/ClangConfig.cmake.in
+++ b/cmake/modules/ClangConfig.cmake.in
@@ -11,3 +11,10 @@ set(CLANG_INCLUDE_DIRS "@CLANG_CONFIG_INCLUDE_DIRS@")
# Provide all our library targets to users.
include("@CLANG_CONFIG_EXPORTS_FILE@")
+
+# By creating clang-tablegen-targets here, subprojects that depend on Clang's
+# tablegen-generated headers can always depend on this target whether building
+# in-tree with Clang or not.
+if(NOT TARGET clang-tablegen-targets)
+ add_custom_target(clang-tablegen-targets)
+endif()