When generating the CMake project in VS, the error "out/build/x64-Debug" does not appear to contain CMakeLists.txt.

I imported a CMake project in Visual Studio 2022. At first, the IDE could automatically generate it. Because of the lack of dependencies, I modified the CMake settings. As a result, the title reported an error and could not be built. The error list showed:

CMake Error: The source directory "D:/grpc_prj/grpc/examples/cpp/helloworld/out/build/x64-Debug" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

Insert image description here
After switching to the output view, you can see the complete command line executed by the IDE and find that there is no problem, but CMake reports an error: It was
Insert image description here
finally located in the CMake settings. When modifying the CMake variables, one of the variables \ended with a character, which resulted in The quotation marks in the command line generated by the IDE are escaped!
Just \delete the characters at the end of the variable value and everything will return to normal. The evil path of Windows against humanity!
Insert image description here

Guess you like

Origin blog.csdn.net/yakamoz423/article/details/132879610