#CMake Inconsistent Across Editors

20 messages · Page 1 of 1 (latest)

restive compassBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

feral topaz
#

For VSCode I know that you need to use the CMake extension to generate a compile command list that is then read for the correct include directories, NeoVIM is similar in that you need to use a plugin to configure for it to find the right include paths, otherwise it uses the system defaults

autumn ibex
#

I see. And I assume there is no environment variable I can set for this akin to CMAKE_PREFIX_PATH?

feral topaz
#

The problem is more that editors aren’t made to read the generator that you use (I assume Ninja) to get the correct compile commands, and thus they need another file and something to parse it with; which the plugins provide

#

So setting an environment variable is somewhat pointless if it can’t read the files to begin with

autumn ibex
#

I figured as much. Are you familiar with said plugin?

#

I assume cmake-tools is what you're getting at

feral topaz
#

I am with the CMake plugin for VSCode, though not with the ones for neovim

#

For CMake-tools, it’s really simple, run the CMake Configure command from the prompt, along with having a clean build path if changing generators - and that’s pretty much it, it will reconfigure on file changes and reload the json file for the compile commands

autumn ibex
#

Just wanted to toss in that you were correct about it being a compiler commands issue- as I downloaded vs code, generated a project with the cmake quick start, and then trasitioned to neovim, where it was finally working

#

Was testing it before going through and configurating a new plugin

#

At the very least, if the plugin for cmaketools gives me issues- it's realtively effortless to just generate the cmakestuff in vscode

feral topaz
#

If NeoVIM works after running cmake-tools, you can set CMAKE_EXPORT_COMPILE_COMMANDS to ON, since that’s pretty much everything that cmake-tools does that’s different from a normal configure

autumn ibex
#

Now that I've figured out the process for doing it manually I think I'll just do that rather than use a plugin

#

Better for reinforcing the exact process imo

#

really appreciate all of your help

feral topaz
#

No problem

restive compassBOT
#

This question is being automatically marked as stale.
If your question has been answered, type !solved.
If your question is not answered feel free to bump the post or re-ask.
Take a look at !howto ask for tips on improving your question.

restive compassBOT
#

<@undefined>

Please Do Not Delete Posts!

Please don't delete forum posts. They can be helpful to refer to later and other members can learn from them. In the future you can use !solved to close a post and mark a post as solved.

autumn ibex
#

!solved