From: Tom Stellard <tstellar@redhat.com> Date: Thu, 9 Mar 2017 19:24:07 +0000 (+0000) Subject: CMake: Don't install llvm-tblgen twice X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f5d1d88cc260b93723cda02f4c5d705c9a07f0b2;p=llvm CMake: Don't install llvm-tblgen twice Summary: The add_tablegen macros defines its own install target, and it was also calling add_llvm_utility which adds another install target. Configuring with -DLLVM_TOOLS_INSTALL_DIR set to something other than 'bin' along with -DLLVM_INSTALL_UTILS=ON was causing llvm-tablgen to be installed to two separate directories. Reviewers: beanz, hans Reviewed By: beanz Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D30656 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297403 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/cmake/modules/TableGen.cmake b/cmake/modules/TableGen.cmake index 0c00bf5e686..da0858e54d4 100644 --- a/cmake/modules/TableGen.cmake +++ b/cmake/modules/TableGen.cmake @@ -99,7 +99,7 @@ macro(add_tablegen target project) set(LLVM_ENABLE_OBJLIB ON) endif() - add_llvm_utility(${target} ${ARGN}) + add_llvm_executable(${target} DISABLE_LLVM_LINK_LLVM_DYLIB ${ARGN}) set(LLVM_LINK_COMPONENTS ${${target}_OLD_LLVM_LINK_COMPONENTS}) set(${project}_TABLEGEN "${target}" CACHE