diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2017-06-17 13:45:55 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2017-06-17 13:45:55 +0000 |
commit | 5b6663a260689c3f1756f409c8a3f7edf015b313 (patch) | |
tree | 728f4ff356d255bad4663ce48dbfe8282f9846e9 /cmake | |
parent | b903fddc562ccc622cabc4f08f5df2af90ceb251 (diff) |
[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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305635 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/TableGen.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmake/modules/TableGen.cmake b/cmake/modules/TableGen.cmake index 21421e4fdbd2..66d36fa5b50f 100644 --- a/cmake/modules/TableGen.cmake +++ b/cmake/modules/TableGen.cmake @@ -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() |