Sarcasm / irony-mode

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

server-compilation: clang-c/Index.h can not be found #530

Closed tastytea closed 5 years ago

tastytea commented 5 years ago

clang version: 7.1.0
OS: Gentoo Linux

Since 0ae10b7eaab6f76af5685ecb41e9400f25748085 (I think), cmake can not find clang-c/Index.h¹. When I add ${CLANG_INCLUDE_DIRS} to target_include_directories(irony-server […], the server compiles successfully.

https://github.com/Sarcasm/irony-mode/blob/80c3ce06b6d6eadc759c65958518d651109671d2/server/src/CMakeLists.txt#L63

irony-server_build-log.txt

¹ The file path is/usr/lib/llvm/7/include/clang-c/Index.h on my computer.

Sarcasm commented 5 years ago

Thank you for the report, indeed, I saw that coming:

https://github.com/Sarcasm/irony-mode/blob/0ae10b7eaab6f76af5685ecb41e9400f25748085/server/src/CMakeLists.txt#L5-L11

I will create a new imported target will all the properties properly setup I think. Don't hesitate to ping me back on this if I forget about it, I cannot do it just now.

Sarcasm commented 5 years ago

I attempted a fix, please let me know if that works.

tastytea commented 5 years ago

It works now, thanks!

Sarcasm commented 5 years ago

Great, thanks for the feedback!