![]() ![]() To debug your code on the remote system, set a breakpoint, select the CMake target as the startup item in the toolbar menu next to the project setting, and click run (or press F5). If you have not created any remote connections, you will be prompted to create one the first time you select a Linux target in your project settings. Std::cout Options > Cross Platform > Connection Manager will be used. (via File > Open > Folder… or devenv.exe ). To get started, create a simple CMakeLists.txt file in the same folder as a cpp file as in the example below. See these instructions for building CMake from source if your package manager provides an older version. The CMake support in Visual Studio requires the server mode support that was introduced in CMake 3.8. The CMake support for Linux is selected by default for this workload. To enable this capability, make sure that you choose the Linux C++ Workload in the Visual Studio installer. ![]() 15.5 is in the Preview channel and removes the limitation on CMake 3.9, there CMake >= 3.8 can be used. Update : 15.4.1 is in the Release channel now and addresses the setup issue previously noted here. You can go here to learn more about CMake in Visual Studio generally. This post will give an overview of the CMake support for Linux in Visual Studio. If your code base is cross-platform you can target both Windows and Linux from within Visual Studio. This enables you to work on your existing code base that uses CMake as your build solution without having to convert it to a VS project. ![]() In Visual Studio 2017 15.4 you can now target Linux from your CMake projects. ![]()
0 Comments
Leave a Reply. |