Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CMake Tools for Visual Studio 2017 stuck parsing

I've the following configuration

  • Visual Studio 15.9.4
  • CMake 3.11

When I create a new cmake project from Visual Studio project templates, it starts configuring project as expected and cmake generation completes with no error. The output window of Visual Studio looks like this

1> -- Generating done
1> -- Build files have been written to: C:/Users/Dell/CMakeBuilds/0538efd0-8db3-fb3e-ba15-48b48c82580d/build/x64-Debug (default)
1> Starting CMake target info extraction ...
1> CMake server connection made.
1> Extracted includes paths.
1> Extracted CMake variables. 1> Extracted source files and headers.
1> Extracted global settings.
1> Extracted code model.
1> Extracted CTest info.
1> Collating data ...
1> Target info extraction done.

But the problem occurs when I try to build, no targets appear, cmake target view of solution explorer says it is still parsing CMakeLists.txt. When I tried to compile with command line it finishes with no error and I am able to run the program. enter image description here

like image 735
Mohit Avatar asked Dec 07 '25 03:12

Mohit


1 Answers

It is a bit hard to see what is going on since you don't show any source code, but I use cmake on the command line to generate solutions files and load them in Visual Studio 2017.

You just need to that once, when you update the CMakeLists.txt files you can save them and compiler them via CTRL + F7 and then reload the solution and project that has updated. This works for small changes.

I also found using cmake directly was very slow since I have a large project. It seems to work well in clion that I use on Linux.

like image 190
Damian Avatar answered Dec 08 '25 18:12

Damian