<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Yep. See r309030.<div class=""><br class=""></div><div class="">-Chris</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 25, 2017, at 2:00 PM, don hinton <<a href="mailto:hintonda@gmail.com" class="">hintonda@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">This causes a warning:<div class=""><br class=""></div><div class=""><div class="">CMake Warning (dev) in cmake/modules/TableGen.cmake:</div><div class="">  A logical block opening on the line</div><div class=""><br class=""></div><div class="">    /Users/dhinton/projects/llvm_project/llvm/cmake/modules/TableGen.cmake:113 (if)</div><div class=""><br class=""></div><div class="">  closes on the line</div><div class=""><br class=""></div><div class="">    /Users/dhinton/projects/llvm_project/llvm/cmake/modules/TableGen.cmake:124 (endif)</div><div class=""><br class=""></div><div class="">  with mis-matching arguments.</div><div class="">Call Stack (most recent call first):</div><div class="">  CMakeLists.txt:833 (include)</div><div class="">This warning is for project developers.  Use -Wno-dev to suppress it.</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">I think you just need to:</div><div class=""><br class=""></div><div class=""><div class="">diff --git a/cmake/modules/TableGen.cmake b/cmake/modules/TableGen.cmake</div><div class="">index 8ee7f970991..7a3c50bb63f 100644</div><div class="">--- a/cmake/modules/TableGen.cmake</div><div class="">+++ b/cmake/modules/TableGen.cmake</div><div class="">@@ -121,7 +121,7 @@ if(LLVM_USE_HOST_TOOLS AND NOT TARGET NATIVE_LIB_LLVMTABLEGEN)</div><div class="">       COMMENT "Building libLLVMTableGen for native TableGen..."</div><div class="">       USES_TERMINAL)</div><div class="">   add_custom_target(NATIVE_LIB_LLVMTABLEGEN DEPENDS LIB_LLVMTABLEGEN)</div><div class="">-endif(LLVM_USE_HOST_TOOLS)</div><div class="">+endif(LLVM_USE_HOST_TOOLS AND NOT TARGET NATIVE_LIB_LLVMTABLEGEN)</div><div class=""><br class=""></div><div class=""> macro(add_tablegen target project)</div><div class="">   set(${target}_OLD_LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS})</div></div><div class=""><br class=""></div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, Jul 25, 2017 at 1:53 PM, Chris Bieneman via llvm-commits <span dir="ltr" class=""><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: cbieneman<br class="">
Date: Tue Jul 25 13:53:31 2017<br class="">
New Revision: 309029<br class="">
<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=309029&view=rev" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-<wbr class="">project?rev=309029&view=rev</a><br class="">
Log:<br class="">
[CMake] Allow TableGen.cmake to be included multiple times<br class="">
<br class="">
This patch allows TableGen.cmake to be safely included multiple times in sub-projects.<br class="">
<br class="">
Modified:<br class="">
    llvm/trunk/cmake/modules/<wbr class="">TableGen.cmake<br class="">
<br class="">
Modified: llvm/trunk/cmake/modules/<wbr class="">TableGen.cmake<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/TableGen.cmake?rev=309029&r1=309028&r2=309029&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-<wbr class="">project/llvm/trunk/cmake/<wbr class="">modules/TableGen.cmake?rev=<wbr class="">309029&r1=309028&r2=309029&<wbr class="">view=diff</a><br class="">
==============================<wbr class="">==============================<wbr class="">==================<br class="">
--- llvm/trunk/cmake/modules/<wbr class="">TableGen.cmake (original)<br class="">
+++ llvm/trunk/cmake/modules/<wbr class="">TableGen.cmake Tue Jul 25 13:53:31 2017<br class="">
@@ -110,7 +110,7 @@ function(add_public_tablegen_<wbr class="">target targ<br class="">
   set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} ${target} PARENT_SCOPE)<br class="">
 endfunction()<br class="">
<br class="">
-if(LLVM_USE_HOST_TOOLS)<br class="">
+if(LLVM_USE_HOST_TOOLS AND NOT TARGET NATIVE_LIB_LLVMTABLEGEN)<br class="">
   llvm_ExternalProject_BuildCmd(<wbr class="">tblgen_build_cmd LLVMSupport<br class="">
     ${LLVM_NATIVE_BUILD}<br class="">
     CONFIGURATION Release)<br class="">
<br class="">
<br class="">
______________________________<wbr class="">_________________<br class="">
llvm-commits mailing list<br class="">
<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/<wbr class="">mailman/listinfo/llvm-commits</a><br class="">
</blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>