Skip to content

Commit 20ec300

Browse files
Tyler WhitneyTyler Whitney
authored andcommitted
stash
1 parent 18ac0b5 commit 20ec300

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

docs/linux/cmake-linux-project.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
22
title: "Create and configure a Linux CMake project in Visual Studio"
33
description: "How to create, configure, edit, and compile a Linux CMake project in Visual Studio"
4-
ms.date: "07/22/2020"
4+
ms.date: "07/23/2020"
55
ms.assetid: f8707b32-f90d-494d-ae0b-1d44425fdc25
66
---
77
# Create and configure a Linux CMake project
88

9-
We recommend that you use CMake for projects that are cross-platform or that you think you might make open-source. You can use CMake projects to build and debug the same source code on Windows, the Windows Subsystem for Linux (WSL), and remote systems.
10-
11-
This article describes how to create a new CMake project and configure it to build and debug on a remote Linux system or WSL.
12-
139
::: moniker range="vs-2015"
1410
Linux support is available in Visual Studio 2017 and later. To see the documentation for these versions, set the Visual Studio **Version** selector control for this article to Visual Studio 2017 or Visual Studio 2019. It's found at the top of the table of contents on this page.
15-
1611
::: moniker-end
12+
1713
::: moniker range=">=vs-2017"
14+
We recommend that you use CMake for projects that are cross-platform or that you think you might make open-source. You can use CMake projects to build and debug the same source code on Windows, the Windows Subsystem for Linux (WSL), and remote systems.
15+
16+
This article describes how to create a new CMake project and configure it to build and debug on a remote Linux system or WSL.
17+
1818
## Before you begin
1919

2020
First, make sure you have the Visual Studio Linux workload installed, including the CMake component. That's the **Linux development with C++** workload in the Visual Studio installer. See [Install the C++ Linux workload in Visual Studio](download-install-and-setup-the-linux-development-workload.md) if you aren't sure that you have that installed.
@@ -26,16 +26,15 @@ Also, make sure the following are installed on the remote machine:
2626
- rsync
2727
- zip
2828
- ninja-build
29-
3029
::: moniker-end
31-
::: moniker range="vs-2017"
3230

31+
::: moniker range="vs-2017"
3332
The CMake support in Visual Studio requires the server mode support that was introduced in CMake 3.8. For a Microsoft-provided CMake variant, download the latest prebuilt binaries at [https://github.com/Microsoft/CMake/releases](https://github.com/Microsoft/CMake/releases).
3433

3534
The binaries are installed in `~/.vs/cmake`. After deploying the binaries, your project automatically regenerates. If the CMake specified by the `cmakeExecutable` field in *CMakeSettings.json* is invalid (it doesn't exist or is an unsupported version), and the prebuilt binaries are present, Visual Studio ignores `cmakeExecutable` and uses the prebuilt binaries.
3635
::: moniker-end
37-
::: moniker range=">=vs-2019"
3836

37+
::: moniker range=">=vs-2019"
3938
Linux support for CMake projects requires that the target machine have a recent version of CMake. Often, the version offered by a distribution's default package manager isn't recent enough to support all the features required by Visual Studio. Visual Studio 2019 detects whether a recent version of CMake is installed on the Linux system. If none is found, Visual Studio shows an info-bar at the top of the editor pane. It offers to install CMake for you from [https://github.com/Microsoft/CMake/releases](https://github.com/Microsoft/CMake/releases).
4039

4140
You can use Visual Studio 2019 to build and debug on a remote Linux system or WSL, and CMake will be invoked on that system. Cmake version 3.14 or later should be installed on the target machine.

0 commit comments

Comments
 (0)