Skip to content

Commit

Permalink
[CMake] Get rid of generating obj.*-tblgen if CMake >= 3.9 for Ninja …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
chapuni committed Jun 17, 2017
1 parent b903fdd commit 5b6663a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmake/modules/TableGen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 5b6663a

Please sign in to comment.