Sarcasm / irony-mode

A C/C++ minor mode for Emacs powered by libclang
GNU General Public License v3.0
901 stars 98 forks source link

stddef.h not found when compiling irony server on openSUSE Tumbleweed #508

Open etam opened 5 years ago

etam commented 5 years ago

openSUSE allows multiple versions of clang to coexist. In my case, stddef.h exists in /usr/lib64/clang/7.0.0/include/stddef.h.

In order to compile the server, I had to add a line in CheckClangResourceDir.cmake under find_path(CHECK_CLANG_RESOURCE_DIR include/stddef.h (line 28) with path to "${LIBCLANG_LIBRARY_DIR}/clang/7.0.0".

I know it's not reasonable to add all possible clang versions here, so some proper cmake magic should be used.