irony-mode
irony-mode copied to clipboard
stddef.h not found when compiling irony server on openSUSE Tumbleweed
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.