<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Crosscompiling TableGen with CMake does not work with a non-default generator"
href="http://llvm.org/bugs/show_bug.cgi?id=15615">15615</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Crosscompiling TableGen with CMake does not work with a non-default generator
</td>
</tr>
<tr>
<th>Product</th>
<td>tools
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>TableGen
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>vslugovsky@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>When running CMake for the native TableGen in a cross-compiled environment, a
default generator is used. If it does not match the generator used by the cross
cmake, build will fail (confirmed with Ninja generator).
A fix is trivial:
diff --git a/cmake/modules/TableGen.cmake b/cmake/modules/TableGen.cmake
index e3bdd9c..944394f 100644
--- a/cmake/modules/TableGen.cmake
+++ b/cmake/modules/TableGen.cmake
@@ -67,6 +67,7 @@ if(CMAKE_CROSSCOMPILING)
add_custom_command(OUTPUT ${CX_NATIVE_TG_DIR}/CMakeCache.txt
COMMAND ${CMAKE_COMMAND} -UMAKE_TOOLCHAIN_FILE -DCMAKE_BUILD_TYPE=Release
-DLLVM_BUILD_POLLY=OFF ${CMAKE_SOURCE_DIR}
+ -G${CMAKE_GENERATOR}
WORKING_DIRECTORY ${CX_NATIVE_TG_DIR}
DEPENDS ${CX_NATIVE_TG_DIR}
COMMENT "Configuring native TableGen...")</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>