Review Request 125276: Use the upstream LLVMConfig.cmake instead of FindLLVM.cmake

Alex Richardson arichardson.kde at gmail.com
Thu Sep 17 12:36:06 UTC 2015



> On Sept. 17, 2015, 1:11 p.m., Kevin Funk wrote:
> > I'm opposing. On quite a few distros (I know Debian/Ubuntu for sure), LLVMConfig.cmake files are not usable (missing CMake includes, etc.). I think the *upcoming* Ubuntu release finally(!) has this fixed, so we can use them (this corresponds to LLVM 3.8)
> > 
> > That's also why I did not drop my custom FindLLVM.cmake script until now. I'd suggest using the the original version first, and only when the lookup fails: fallback to CONFIG-based search.
> 
> Kevin Funk wrote:
>     Feel free to make sure FindLLVM.cmake sets the same/similar variables like LLVMConfig.cmake in order to make CMakeLists.txt as simple as possible

For my convert2qt5signalslot project I use a modified version of your FindClang.cmake that works fine with distro provided LLVMConfig.cmake: https://github.com/a-richardson/convert2qt5signalslot/blob/master/cmake/FindClang.cmake

It works with openSUSE 13.2 which has LLVM 3.5 and Tumbleweed which currently has 3.6.1: https://build.opensuse.org/package/show/home:a_richardson/convert2qt5signalslot

However, that could be because openSUSE applies patches to the LLVMConfig.cmake so that it works correctly. If that is the case how about changing the variable names to match the ones in LLVMConfig.cmake and adding something like: 
```
if (Clang_FIND_VERSION VERSION_GREATER 3.7)
   message(FATAL_ERROR "LLVMConfig.cmake is usable now -> remove FindLLVM.cmake. See https://git.reviewboard.kde.org/r/125276/")
endif()
```


- Alex


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125276/#review85562
-----------------------------------------------------------


On Sept. 17, 2015, 1:04 p.m., Alex Richardson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125276/
> -----------------------------------------------------------
> 
> (Updated Sept. 17, 2015, 1:04 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdev-clang
> 
> 
> Description
> -------
> 
> Use the upstream LLVMConfig.cmake instead of FindLLVM.cmake
> 
> This has existed at least since 3.5 so we can make use of it
> 
> 
> Diffs
> -----
> 
>   cmake/FindClang.cmake 6c9bd6ef0242319122dcc7e6fd6cea8d9f0cbfbb 
>   cmake/FindLLVM.cmake 4441779f4baac17895914937da245da0d480d755 
> 
> Diff: https://git.reviewboard.kde.org/r/125276/diff/
> 
> 
> Testing
> -------
> 
> Works for me with 3.7
> 
> 
> Thanks,
> 
> Alex Richardson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20150917/9cd638a4/attachment.html>


More information about the KDevelop-devel mailing list