Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake-ide #5718

Closed
steve-lorimer opened this issue Apr 7, 2016 · 13 comments
Closed

cmake-ide #5718

steve-lorimer opened this issue Apr 7, 2016 · 13 comments

Comments

@steve-lorimer
Copy link
Contributor

How similar to cmake-ide is the spacemacs c++ layer?

Have you considered pulling it in?

@TheBB
Copy link
Collaborator

TheBB commented Apr 7, 2016

I haven't tried it but,

  • rtags: no, but there's a PR for it that is quite popular
  • flycheck: yes
  • auto-complete-clang: no, we use company
  • company-clang: yes
  • irony: no

There is no particular support for reading setup from CMake files directly. For big projects I use a wrapper compiler that extracts the arguments it needs and adds them to a .clang_complete file which Spacemacs reads.

It would be interesting to use this package for reading CMake setup files but probably not for the overall integrated experience.

@steve-lorimer
Copy link
Contributor Author

I watched your c++ spacemacs YouTube video, and saw your use of cc_args.

Then I saw Atila's lightening talk which did it automatically, leading to this question.

It's only 15 mins long, much of which can be skipped, worth a quick watch!

https://www.youtube.com/watch?v=5FQwQ0QWBTU

@mssun
Copy link
Contributor

mssun commented Apr 11, 2016

If you are using cmake for building, it can generate compiler options by setting CMAKE_EXPORT_COMPILE_COMMANDS on. The output file is compile_commands.json. YCM will read this file for completion by setting the compilation database variable. I guess clang complete also supports the compile_commands.json file, but haven't tried it. I think it looks better than add a wrapper before compiler. It seems that cmake-ide is based on compile_commands.json.

@myrgy
Copy link
Contributor

myrgy commented Dec 19, 2017

@syl20bnr , this issue could be close because #9432 has been merged

@Compro-Prasad
Copy link
Contributor

Still open!!? Almost every other issue/PR referencing this issue has been closed @syl20bnr . Isn't this issue resolved?

@syl20bnr
Copy link
Owner

syl20bnr commented May 23, 2018 via email

@LucaMarconato
Copy link

LucaMarconato commented Nov 1, 2018

@syl20bnr I installed the latest version of Spacemacs from master and if I try to use the layer cmake I get an error saying that it is not available.
How can I set it up? Do I need to "add another source for layers" (like when one has to add MELPA if he wants packages that are not in ELPA)?

@sdwolfz
Copy link
Collaborator

sdwolfz commented Nov 1, 2018

@LucaMarconato the cmake layer is only available on the develop branch right now: http://develop.spacemacs.org/layers/+tools/cmake/README.html.

@LucaMarconato
Copy link

Ah cool! Is it stable or should I just wait for the final release? :)

@sdwolfz
Copy link
Collaborator

sdwolfz commented Nov 1, 2018

Develop should be stable enough for day to day use.

@LucaMarconato
Copy link

@sdwolfz I installed but it does not seem to work out-of-the-box, should I also install irony and company-irony?

@sdwolfz
Copy link
Collaborator

sdwolfz commented Nov 1, 2018

Did you add the variable as well? (cmake :variables cmake-enable-cmake-ide-support t)

@LucaMarconato
Copy link

Yes, still not working. Anyway since I do not want go OT I will open another thread (not immediately, I want to experiment more with the configuration first). Thank you for the answers you have given me so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants