Skip to content

Commit

Permalink
LLVMTableGenGlobalISel: Provide INTERFACE_INCLUDE_DIRECTORIES
Browse files Browse the repository at this point in the history
Its user may include its headers as `GlobalISel/*.h`
  • Loading branch information
chapuni committed Feb 11, 2023
1 parent 4537bda commit 2e08e43
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/unittests/TableGen/CMakeLists.txt
Expand Up @@ -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)
6 changes: 6 additions & 0 deletions llvm/utils/TableGen/GlobalISel/CMakeLists.txt
Expand Up @@ -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}/..>
)

0 comments on commit 2e08e43

Please sign in to comment.