Follow the instructions below to build and debug a CMake project on a WSL 2 distro.ġ. You can learn more about CMake Presets in our announcement blog post and documentation. The WSL 2 toolset is supported by our CMake Presets integration in Visual Studio. Cross-platform CMake development with a WSL 2 distro See Comparing WSL 1 and WSL 2 to learn more about the differences between WSL 1 and WSL 2.Ĭontinue reading for a step-by-step guide on getting started with CMake and WSL 2 and an overview of our MSBuild-based WSL 2 support. This local rsync copy will occur automatically when Visual Studio detects that you are using a WSL 2 distro and will require no user intervention. When targeting a WSL 2 distro, Visual Studio will execute a local rsync copy to copy files from the Windows file system to the WSL file system. Our C++ cross-platform support in Visual Studio assumes that all source files originate in the Windows file system. However, CMake is our recommendation for all C++ cross-platform development with Visual Studio because it allows you to build and debug the same project on Windows, WSL, and remote systems. Visual Studio’s WSL 2 toolset supports both CMake and MSBuild-based Linux projects.
0 Comments
Leave a Reply. |