ARTICLE AD BOX
I'm trying to put together a small utility for computing a tetrahedralization of a mesh (https://github.com/blackears/cyclops_tetrahedralizer). Since I want this to be open source, I thought it would be a good idea to use Cmake as my build system. However, I'm having some trouble setting it up.
I'm developing on Windows 11 and using Visual Studio Code as my editor. So far I've been able to compile my project by executing the following in the terminal:
cmake -B build -S .\cyclopsTetrahedralizer\ msbuild .\build\CyclopsTetrahedralizer.slnThis works, and I can run at the command line, but I'd like to be able to use VS Code's debugger to let me step through code and see memory.
If I select Teriminal > Run Build Task... > CMake:Build, I get the following printed in the terminal:
* Executing task: CMake: build Workspace is /x:/dev/github.com/blackears/cyclopsTessellate build task started.... "C:\Program Files\CMake\bin\cmake.EXE" --build --config Debug --target all -- Error: not a CMake build directory (missing CMakeCache.txt) build finished with error(s). * The terminal process failed to launch (exit code: 1). * Terminal will be reused by tasks, press any key to close it.Cmake is putting the CMakeCache.txt file in the ./build directory. I'm not sure how to get it to look for it there.
I've also created a launch.json file to try to run my executable:
{ "version": "0.2.0", "configurations": [ { "name": "(Windows) Launch - cube", "type": "cppvsdbg", "request": "launch", "program": "${workspaceFolder}/build/Debug/cyclopsTetrahedralizer.exe", "args": [ "--output", "${workspaceFolder}/testing/cube_tetrahedra.obj", "${workspaceFolder}/assets/cube.obj" ], "symbolSearchPath": "${workspaceFolder}/build/Debug/", "stopAtEntry": false, "cwd": "${fileDirname}", "environment": [], "console": "externalTerminal" }, ] }While I can use this to run the executable, it does not seem to attach to the process, so execution does not stop at any of my breakpoints.
I'm new to Cmake and don't use Visual Studio Code very often. What do I need to do to be able to build and run my project using Cmake/Visual Studio Code?
