[llvm-bugs] [Bug 37128] ClangConfig.cmake is unusable

via llvm-bugs llvm-bugs at lists.llvm.org
Mon May 7 14:28:02 PDT 2018


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

Sylvestre Ledru <sylvestre at debian.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
           Assignee|unassignedbugs at nondot.org   |peter at lekensteyn.nl
         Resolution|---                         |FIXED

--- Comment #7 from Sylvestre Ledru <sylvestre at debian.org> ---
And uploaded in Debian! Many thanks to peter

Here is a test case:
--
rm -rf cmaketest && mkdir cmaketest
cat > cmaketest/CMakeLists.txt <<EOF
cmake_minimum_required(VERSION 2.8.12)
project(SanityCheck)
find_package(LLVM $VERSION REQUIRED CONFIG)
message(STATUS "LLVM_CMAKE_DIR: \${LLVM_CMAKE_DIR}")
if(NOT EXISTS "\${LLVM_TOOLS_BINARY_DIR}/clang")
message(FATAL_ERROR "Invalid LLVM_TOOLS_BINARY_DIR: \${LLVM_TOOLS_BINARY_DIR}")
endif()
# TODO add version to ClangConfig.cmake and use $VERSION below
find_package(Clang REQUIRED CONFIG)
find_file(H clang/AST/ASTConsumer.h PATHS \${CLANG_INCLUDE_DIRS}
NO_DEFAULT_PATH)
message(STATUS "CLANG_INCLUDE_DIRS: \${CLANG_INCLUDE_DIRS}")
if(NOT H)
message(FATAL_ERROR "Invalid Clang header path: \${CLANG_INCLUDE_DIRS}")
endif()
EOF
(cd cmaketest && cmake .)
rm -rf cmaketest

--

Builds for 5.0 for apt.llvm.org have been started too!

I will update 6.0 & snapshot later!

-- 
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/20180507/5752a4ce/attachment.html>


More information about the llvm-bugs mailing list