1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

[CMake] Get rid of generating obj.*-tblgen if CMake >= 3.9 for Ninja generator.

CMake-3.9 doesn't let compilation units depend on their dependent libraries.

llvm-svn: 305635
This commit is contained in:
NAKAMURA Takumi 2017-06-17 13:45:55 +00:00
parent e6ce8bcee4
commit ad9505ab40

View File

@ -104,7 +104,8 @@ macro(add_tablegen target project)
set(${target}_OLD_LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS})
set(LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS} TableGen)
if(NOT XCODE)
# CMake-3.9 doesn't let compilation units depend on their dependent libraries.
if(NOT (CMAKE_GENERATOR STREQUAL "Ninja" AND NOT CMAKE_VERSION VERSION_LESS 3.9) AND NOT XCODE)
# FIXME: It leaks to user, callee of add_tablegen.
set(LLVM_ENABLE_OBJLIB ON)
endif()