[llvm] 2e08e43 - LLVMTableGenGlobalISel: Provide `INTERFACE_INCLUDE_DIRECTORIES`
NAKAMURA Takumi via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 11 10:06:29 PST 2023
Author: NAKAMURA Takumi
Date: 2023-02-12T03:06:00+09:00
New Revision: 2e08e431cc18ddad724e9dee6e10ff3b89022374
URL: https://github.com/llvm/llvm-project/commit/2e08e431cc18ddad724e9dee6e10ff3b89022374
DIFF: https://github.com/llvm/llvm-project/commit/2e08e431cc18ddad724e9dee6e10ff3b89022374.diff
LOG: LLVMTableGenGlobalISel: Provide `INTERFACE_INCLUDE_DIRECTORIES`
Its user may include its headers as `GlobalISel/*.h`
Added:
Modified:
llvm/unittests/TableGen/CMakeLists.txt
llvm/utils/TableGen/GlobalISel/CMakeLists.txt
Removed:
################################################################################
diff --git a/llvm/unittests/TableGen/CMakeLists.txt b/llvm/unittests/TableGen/CMakeLists.txt
index e0c7c682df53..7830e0218045 100644
--- a/llvm/unittests/TableGen/CMakeLists.txt
+++ b/llvm/unittests/TableGen/CMakeLists.txt
@@ -14,5 +14,5 @@ add_llvm_unittest(TableGenTests DISABLE_LLVM_LINK_LLVM_DYLIB
CodeExpanderTest.cpp
ParserEntryPointTest.cpp
)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../utils/TableGen)
+
target_link_libraries(TableGenTests PRIVATE LLVMTableGenGlobalISel LLVMTableGen)
diff --git a/llvm/utils/TableGen/GlobalISel/CMakeLists.txt b/llvm/utils/TableGen/GlobalISel/CMakeLists.txt
index c23ef6742f32..d6b7a5216829 100644
--- a/llvm/utils/TableGen/GlobalISel/CMakeLists.txt
+++ b/llvm/utils/TableGen/GlobalISel/CMakeLists.txt
@@ -13,3 +13,9 @@ add_llvm_library(LLVMTableGenGlobalISel STATIC DISABLE_LLVM_LINK_LLVM_DYLIB
GIMatchDagPredicateDependencyEdge.cpp
GIMatchTree.cpp
)
+
+# Users may include its headers as "GlobalISel/*.h"
+target_include_directories(LLVMTableGenGlobalISel
+ INTERFACE
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
+ )
More information about the llvm-commits
mailing list