Files
swift-mirror/cmake/modules/AddSwiftTableGen.cmake
Michael Gottesman 5d984de9ec [cmake] Instead of setting LLVM_TABLEGEN_EXE, use our own SWIFT_TABLEGEN_EXE variable.
This eliminates us setting an LLVM_ prefixed variable in a situation where there is
a viable alternative.

We want to eliminate as many of these as possible since they can cause conflicts
with variables set in LLVMConfig.cmake.

I also added some convenience tablegen functions in AddSwiftTableGen.cmake and
changed all tblgen users to use that instead.

rdar://26154980
2016-06-24 17:18:45 -07:00

14 lines
415 B
CMake

include(TableGen)
# This needs to be a macro since tablegen (which is a function) needs to set
# variables in its parent scope.
macro(swift_tablegen)
tablegen(SWIFT ${ARGN})
endmacro()
# This needs to be a macro since add_public_tablegen_target (which is a
# function) needs to set variables in its parent scope.
macro(swift_add_public_tablegen_target target)
add_public_tablegen_target(${target})
endmacro()