Skip to content

Commit 7098d64

Browse files
authored
Merge pull request MicrosoftDocs#463 from robotdad/patch-2
Update cmake-linux-project.md
2 parents 3a141cf + a7676c9 commit 7098d64

File tree

1 file changed

+3
-42
lines changed

1 file changed

+3
-42
lines changed

docs/linux/cmake-linux-project.md

Lines changed: 3 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ When you install the Linux C++ workload for Visual Studio, CMake support for Lin
2222
This topic assumes you have basic familiarity with CMake support in Visual Studio. For more information, see [CMake Tools for Visual C++](../ide/cmake-tools-for-visual-cpp.md). For more information about CMake itself, see [Build, Test and Package Your Software With CMake](https://cmake.org/).
2323

2424
> [!NOTE]
25-
> The CMake support in Visual Studio requires the server mode support that was introduced in CMake 3.8. For a Microsoft-provided CMake variant that supports the [CMake Targets View](https://blogs.msdn.microsoft.com/vcblog/2018/04/09/cmake-support-in-visual-studio-targets-view-single-file-compilation-and-cache-generation-settings/) pane in Visual Studio, download the latest prebuilt binaries at [https://github.com/Microsoft/CMake/releases](https://github.com/Microsoft/CMake/releases). If your package manager provides an older version than CMake 3.8, you can work around it by [building CMake from source](#build-a-supported-cmake-release-from-source), or you prefer to use standard CMake, you can download it from the official [CMake download page](https://cmake.org/download/).
25+
> 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).
2626
2727
## Open a folder
2828

@@ -110,49 +110,10 @@ There are also some optional settings you can use for more control:
110110

111111
These options allow you to run commands on the remote box before and after building, and before CMake generation. They can be any valid command on the remote box. Output is piped back to Visual Studio.
112112

113-
## Build a supported CMake release from source
113+
## Download prebuilt CMake binaries
114114

115-
The minimum version of CMake required on your Linux machine is 3.8, and it must also support server mode. To verify this run this command:
115+
Your Linux distro may have an older version of CMake. 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).
116116

117-
```cmd
118-
cmake --version
119-
```
120-
121-
To verify that server mode is enabled, run:
122-
123-
```cmd
124-
cmake -E capabilities
125-
```
126-
127-
In the output, look for **"serverMode":true**. Note that even when you compile CMake from source as described below you should check the capabilities when done. Your Linux system may have limitations that prevent server mode from being enabled.
128-
129-
To get started building CMake from source in the shell for your Linux system, make sure your package manager is up to date, and that you have git and cmake available.
130-
131-
First, clone the CMake sources from the [Microsoft CMake repo](https://github.com/Microsoft/CMake) where we maintain a fork for Visual Studio's CMake support:
132-
133-
```cmd
134-
sudo apt-get update
135-
sudo apt-get install -y git cmake
136-
git clone https://github.com/Microsoft/CMake.git
137-
cd CMake
138-
```
139-
140-
Next, to build and install the current release of CMake to /usr/local/bin, run these commands:
141-
142-
```cmd
143-
mkdir out
144-
cd out
145-
cmake ../
146-
make
147-
sudo make install
148-
```
149-
150-
Next, run this command to verify the version is >= 3.8 and that server mode is enabled:
151-
152-
```cmd
153-
/usr/local/bin/cmake –version
154-
cmake -E capabilities
155-
```
156117

157118
## See Also
158119

0 commit comments

Comments
 (0)