[llvm-bugs] [Bug 45027] New: Missing ClangConfigVersion

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Feb 26 00:02:01 PST 2020


https://bugs.llvm.org/show_bug.cgi?id=45027

            Bug ID: 45027
           Summary: Missing ClangConfigVersion
           Product: Build scripts
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: cmake
          Assignee: unassignedbugs at nondot.org
          Reporter: alex.reinking at gmail.com
                CC: llvm-bugs at lists.llvm.org

I cloned LLVM from https://github.com/llvm/llvm-project.git

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?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200226/398adf22/attachment.html>


More information about the llvm-bugs mailing list