go2sh / cmake-integration-vscode

CMake Server Interface for VSCode.
https://go2sh.github.io/cmake-integration-vscode/
Other
19 stars 11 forks source link

Unable to build project #22

Closed DavidA2014 closed 5 years ago

DavidA2014 commented 5 years ago

I have VS Code 1.35.0 and CMake Integration 0.4.1, running on Windows 10.

I have created a workspace and added to it a folder containing:

Hitting F7 does nothing. Nothing is reported by the extension in the status bar or in the output window. I guess I have omitted some basic step. Please will you suggest what I need to do to make CMake work with this project?

go2sh commented 5 years ago

Did you set a generator in the settings? I guess you want visual studio. Set it and try to restart. Can you check, if there is a cmake tab under the outputs? Can you post it.

DavidA2014 commented 5 years ago

The generator for the workspace is Ninja (the default).

I have a cmake tab but it has no output:

image

I get some errors at startup:

image

Do I need to install CMake?

DavidA2014 commented 5 years ago

I have now installed CMake 3.15 and set the generator to Visual Studio 15 2017. When starting VS Code I see: image

go2sh commented 5 years ago

Can post the complete error. I'll add a check about cmake and its version

DavidA2014 commented 5 years ago

Complete error: Failed to start CMake Client(c:\SVNProj\<snip>\Prototypes\CPlaneTest): Failed to activate protocol version: "CMAKE_GENERATOR" is set but incompatible with configured generator value.

image

go2sh commented 5 years ago

Ah yes. Search for restart client in commands an delete the build Folder before. Check the docs under troubleshooting

DavidA2014 commented 5 years ago

Thanks that fixed it.

Is the build output shown in OUTPUT > Extensions >CMake ?

FYI I see this warning in the console: CMake Deprecation Warning: The 'cmake-server(7)' is deprecated. Please port clients to use the 'cmake-file-api(7)' instead.

go2sh commented 5 years ago

The configure and build output is shown under Output > CMake - FolderName. See your image above.

I know, that it is deprecated. The extension supports the file api already. You can change it in the settings.

I'll add some kind of cmake detection and version detection in the next release.

DavidA2014 commented 5 years ago

Thank you for your help. It's working nicely now.

go2sh commented 5 years ago

You are welcome.