<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - Missing ClangConfigVersion"
href="https://bugs.llvm.org/show_bug.cgi?id=45027">45027</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Missing ClangConfigVersion
</td>
</tr>
<tr>
<th>Product</th>
<td>Build scripts
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>cmake
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>alex.reinking@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>I cloned LLVM from <a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
When building LLVM+clang+lld with CMake via:
cmake -G "Visual Studio 16 2019" -A x64 -Thost=x64
-DLLVM_ENABLE_PROJECTS="clang;lld" -DLLVM_BUILD_32_BITS=OFF -DLLVM_ENABLE_EH=ON
-DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_ASSERTIONS=ON
-DLLVM_TARGETS_TO_BUILD=X86;ARM;NVPTX;AArch64;Mips;Hexagon;PowerPC path/to/llvm
the installed directory tree has the following files:
/lib/cmake/llvm/{LLVMConfig,LLVMConfigVersion,...}.cmake
/lib/cmake/clang/{ClangConfig,ClangTargets,ClangTargets-release}.cmake
This is critically missing ClangConfigVersion.cmake! Because of this, it is not
possible to simply add the root of the install directory to CMAKE_MODULE_PATH.
One must instead specify -DClang_DIR and -DLLVM_DIR separately and use
find_package in CONFIG mode rather than the default.
I've tested this with LLVM 8.0.1, 9.0.1, 10.0rc2, and trunk.
Is this an error building LLVM/Clang on my part? Is there a better way of
getting to the `clang` imported target?</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>