1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/unittests/TableGen/CMakeLists.txt
Sebastian Neubauer ca62d6a9b1 Make unittests include path relative
This change is relevant when embedding the llvm cmake project into
another project.  It should not change the build behavior of a normal
llvm build.

In the case where llvm is embedded as a cmake subproject,
CMAKE_SOURCE_DIR does not point to the expected directory and building
the tests fails.
Using CMAKE_CURRENT_SOURCE_DIR fixes this problem, as it will always
point to the same directory.

Differential Revision: https://reviews.llvm.org/D73466
2020-02-21 10:19:11 +01:00

18 lines
479 B
CMake

set(LLVM_LINK_COMPONENTS
TableGen
Support
)
set(LLVM_TARGET_DEFINITIONS Automata.td)
tablegen(LLVM AutomataTables.inc -gen-searchable-tables)
tablegen(LLVM AutomataAutomata.inc -gen-automata)
add_public_tablegen_target(AutomataTestTableGen)
add_llvm_unittest(TableGenTests
CodeExpanderTest.cpp
AutomataTest.cpp
)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../utils/TableGen)
target_link_libraries(TableGenTests PRIVATE LLVMTableGenGlobalISel LLVMTableGen)