D15895: Use CLANG_INCLUDE_DIRS for clang include dir

Kevin Funk noreply at phabricator.kde.org
Thu Oct 4 07:57:09 BST 2018


kfunk requested changes to this revision.
kfunk added a subscriber: mwolff.
kfunk added a comment.
This revision now requires changes to proceed.


  But I think in general that approach makes more sense. Thanks for working on it.
  
  Comments from @mwolff would be appreciated, too, since he worked on that feature to begin with.

INLINE COMMENTS

> FindClang.cmake:92
>    set(CLANG_LIBRARY_DIRS ${LLVM_LIBRARY_DIRS})
> -  set(CLANG_INCLUDE_DIRS ${LLVM_INCLUDE_DIRS})
>    set(CLANG_VERSION ${LLVM_VERSION})

IIUC then `CLANG_INCLUDE_DIRS` shouldn't be touched. `CLANG_INCLUDE_DIRS` is for finding the correct include dirs for building KDevClangSupport against libclang -- we don't need to have things like compiler builtin includes in there.

Rather, leave `CLANG_INCLUDE_DIRS` as it is and do `find_path(CLANG_BUILTIN_DIR ...)`, in other words: create another variable.

@buschinski Just to double-check: /usr/lib64/llvm/7/include has a `clang` subfolder on Gentoo, right?

> FindClang.cmake:104
> +  if (NOT CLANG_INCLUDE_DIRS)
> +      message(FATAL_ERROR "Unabled to find the include file cpuid.h from clang.")
> +  endif()

Typo: "Unabled"

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D15895

To: buschinski, #kdevelop, kfunk
Cc: mwolff, aaronpuchert, brauch, kossebau, kfunk, arrowd, kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20181004/4c9bc2f0/attachment-0001.html>


More information about the KDevelop-devel mailing list