简体   繁体   中英

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. 在此处输入图片说明

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM