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: unassignedb...@nondot.org
          Reporter: alex.reink...@gmail.com
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to