You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update cmake-presets-vs.md
Add instructions for configuring clang-cl with the ClangCL toolset configure preset instead of by setting CMAKE_C_COMPILER and CMAKE_CXX_COMPILER in cacheVariables.
* Add gray border
* LinkFix: cpp-docs-pr (2021-11)
* Clarify C4146 per VCSig list (#3923)
* Clarify C4146 per VCSig list
* Fix link issues.
* Update enable CMake Presets
* fix rel links
* fix github 3528
* acrolinx
* change order of example
* Add version info to NMAKE macro functions
* Bulk fix entity `&` part 3
* threshhold test
* Eliminate even more `&` entities
* Minimum Viable Phix
* Once more into the `&` breech
* Add Visual Studio 2022 Platform Toolset Version
* Add /fpcvt compiler option docs (#3886)
* Add /fpcvt compiler option docs
* Fix copypasta error
* Update fp conversion intrinsics, too.
* Replace deleted table row
* Acrolinx pass
* Fix TOC issues
* Add useful links to intrinsics
* Updates per John Morgan, plus acrolink
* Update version info
* Clean up rvalue reference article
* Fix to `/fpcvt` per John Morgan email
* Reformat WeakRef class document.
* Update Advanced prop page and C1107
* Remove unrelated change.
* Minimizing entity form of & (#3916)
* Initial pass minimizing on > entities (#3919)
* Initial pass on > entities
* Fix everything.
* Try without `<` entities in title/desc
* Clean up pass
* Update docs/atl-mfc-shared/reference/cfiletime-class.md
Co-authored-by: Tracey Torble <[email protected]>
* Update tn026-ddx-and-ddv-routines.md
`DoDialogExchange` -> `DoDataExchange`
* Fix incorrect import example
* github fix 3544
* GITHUB FIX FOR #3549
* Add UWP to list of unsupported ASAN features.
* Fix misnamed mt.exe options. Acrolinx all.
* Attempt fpcvt simplification per John Morgan.
* Fix cpp-docs 3546
* Address complaint in cpp-docs 3554 (#3950)
* Add section on CMake partial activation
* 17.1 Update warnings, fix cpp-docs 3563 (#3954)
* 17.1 Update warnings, fix cpp-docs 3563
* fix date
* Add `/Zc:externC` compiler option doc, fix 1594
* Tweaks.
* Fix links, header syntax issues
* Fix issues in XML Docs reference
* Make list match apparently intended style
* Fix broken link.
* Add docs for new check
Signed-off-by: Kyle Reed <[email protected]>
* fix toc
* remove .md from toc title
* Revert "Add docs for new linter check"
* update runtime spelling
* Bulk fix: remove HTML entities from yml headers (#3962)
* Style and content fixes in cpp language docs
* Changing confusing wording about C++ exceptions
* Bulk fix HTML entities in H1 (#3966)
* Fix lt-gt entity pairs
* Bulk fix of `<`-`>` pairs in H1 headings
* Oops, deleted initial `#`
* Fix two more H1 issues
* update with existing .openpublishing.publish.config.json
* C++ tutorial landing page, attempt 2
* Revert redirection of get-started index.yml file
* Fix typo
* Bulk fix `<`, `>`, and `.period;` entities
* operatoroperator
* `/hotpatch`: No jump to the first instruction
* Update Acrolinx for main branch
* Change learn about item type
* Add get started TOC
* fix over machine translation problems (#3977)
* fix over machine translation problems
* acrolinx and misses
* markdown fixes
Co-authored-by: TylerMSFT <[email protected]>
* Make the grammar bot happy
* Fix things that look like parameters. (#3978)
* Fix things that look like parameters.
* Acrolinxy
* Misc fixes
* Other fixes
* Fix typos
* Acrolinx some more
* [17.0] Update links to download Visual Studio (#3981)
* Update links to download Visual Studio
* Remove VS 2019 reference
* Address cpp-docs 3565
* Also cpp-docs 439
* cpp-docs 947
* cpp-docs 1002
* accuratized
* cpp-docs 1035
* Twhitney named modules (#3960)
* draft
* draft
* draft
* fix links
* cleanup
* added some more info
* add some see also references
* cleanup pass
* remove text about overloads
* tech review
* little better wording
* a little more word smithing
* fix link
* acrolinx
* readthrough pass
* Readthrough to test building the project
* acrolinx
* rename media file
Co-authored-by: TylerMSFT <[email protected]>
* cpp-docs 1305
* cpp-docs 1324
* address github issue #3524 and add code escape to prevent over machine translation
* missed a couple escapes
* couple more code escapes
* one more escape
* Address cpp-docs 3583: LNK1107 clarity
* Tweaks
* tweak formatting
* Expand on fix for cpp-docs 1035 (#3986)
* Expand of fix for cpp-docs 1035
* Mention overloads.
* Grammar and formatting fixes
* add summary of what will learn in module
* [17.1p2] Add docs for comparison/bitwise c++ linter check. (#3964)
* Revert "Revert "Add docs for new linter check""
This reverts commit e56971f.
* PR feedback
Signed-off-by: Kyle Reed <[email protected]>
* Update cmake-presets-vs.md
* Update cmake-presets-vs.md
* Switch http to https and fix broken links
* Acrolinx
* Style pass for the grammar checker bot
* Fix two incorrect conditions in the ARM packed exception handling
For the prologue, the distinction between `mov r11, sp` and
`add r11, sp, #xx` lies only in whether other registers are pushed
before R11 and LR in prologue instruction 2. (The condition
`R`==1 and `PF`==0 corresponds to no other registers pushed before
`r11`.) The `L` flag doesn't affect it (and the documentation explicit
says that when `C` is set, then `L` also must be set, thus `C`==1
and `L`==0 is tautological too).
This was correctly described in the textual form, but the conditions
in the table included one erronous case.
For the epilogue, when `Ret`!=0, the function doesn't return by
popping LR directly into PC, but with an explicit branch instruction
(10a or 10b). In this case, if `L`==1, the LR register is included
in the list of registers popped in instruction 8. If register
homing is used (`H`==1), then instruction 9a is used instead of 9b.
This case seemed to have been overlooked both in the textual
description and in the table.
Also, when prologue instruction form 3a is used, clarify that
it corresponds to the unwind code FB (narrow nop) only, that unwinding
such a prologue doesn't restore `sp` from `r11`.
Also fix a typo and clarify that encodings with C=1, L=0 are
invalid.
* Address cpp-docs 3588 error in link commands (#3996)
* Address cpp-docs 3588 error in link commands
* Update ms.date
* Acrolinx fixes to frontrun cpp-docs 3541
* Post-3541 acrolinx pass
* Update how-to-marshal-structures-using-cpp-interop.md
Change "=" into "-"
* Add _CountOneBits[64] to the ARM64 intrinsic doc
* Update .acrolinx-config.edn
update to reflect default branch name change
* update json examples (#4017)
* update json examples
* acrolinx
Co-authored-by: TylerMSFT <[email protected]>
* fix github issue #3600
* formatting cleanup and acrolinx
Co-authored-by: Jonathan Sweemer <[email protected]>
Co-authored-by: Erika <[email protected]>
Co-authored-by: opbld16 <[email protected]>
Co-authored-by: Colin Robertson <[email protected]>
Co-authored-by: opbld17 <[email protected]>
Co-authored-by: Christopher McClister <[email protected]>
Co-authored-by: PRMerger16 <[email protected]>
Co-authored-by: Laura Brenner <[email protected]>
Co-authored-by: opbld15 <[email protected]>
Co-authored-by: TylerMSFT <[email protected]>
Co-authored-by: PRMerger18 <[email protected]>
Co-authored-by: PRMerger4 <[email protected]>
Co-authored-by: PRMerger6 <[email protected]>
Co-authored-by: MohammadHadi Attarieh <[email protected]>
Co-authored-by: PRMerger15 <[email protected]>
Co-authored-by: PRMerger10 <[email protected]>
Co-authored-by: Haig MacGregor <[email protected]>
Co-authored-by: Tracey Torble <[email protected]>
Co-authored-by: Waiting <[email protected]>
Co-authored-by: roxk <[email protected]>
Co-authored-by: Tyler Whitney <[email protected]>
Co-authored-by: branh <[email protected]>
Co-authored-by: John Ellison <[email protected]>
Co-authored-by: PRMerger8 <[email protected]>
Co-authored-by: PRMerger17 <[email protected]>
Co-authored-by: Sam Freed <[email protected]>
Co-authored-by: Colin Cooper <[email protected]>
Co-authored-by: Paula Miller <[email protected]>
Co-authored-by: Kyle Reed <[email protected]>
Co-authored-by: Hannes Harnisch <[email protected]>
Co-authored-by: Anna Huff <[email protected]>
Co-authored-by: Ying Hua <[email protected]>
Co-authored-by: Alex Guteniev <[email protected]>
Co-authored-by: Dennis Rea <[email protected]>
Co-authored-by: PRMerger3 <[email protected]>
Co-authored-by: PRMerger Service account 2 <[email protected]>
Co-authored-by: Martin Storsjö <[email protected]>
Co-authored-by: Kristine Toliver <[email protected]>
Co-authored-by: AndreaLu <[email protected]>
Co-authored-by: Matt Gardner <[email protected]>
Co-authored-by: Sarah Vilaysom <[email protected]>
Copy file name to clipboardExpand all lines: docs/linux/cmake-linux-configure.md
+27-17Lines changed: 27 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: "Configure a Linux CMake project in Visual Studio"
3
3
description: "How to configure Linux CMake settings in Visual Studio"
4
-
ms.date: "08/08/2020"
4
+
ms.date: 01/03/2022
5
5
---
6
6
# Configure a Linux CMake project in Visual Studio
7
7
@@ -10,11 +10,11 @@ Linux support is available in Visual Studio 2017 and later. To see the documenta
10
10
::: moniker-end
11
11
12
12
::: moniker range=">=msvc-150"
13
-
This topic describes how to add a Linux configuration to a CMake project that targets either a remote Linux system or Windows Subsystem for Linux (WSL). It continues the series that began with [Create a Linux CMake project in Visual Studio](cmake-linux-project.md). If you are using MSBuild, instead, see [Configure a Linux MSBuild Project in Visual Studio](configure-a-linux-project.md)
13
+
This topic describes how to add a Linux configuration to a CMake project that targets either a remote Linux system or Windows Subsystem for Linux (WSL). It continues the series that began with [Create a Linux CMake project in Visual Studio](cmake-linux-project.md). If you're using MSBuild, instead, see [Configure a Linux MSBuild Project in Visual Studio](configure-a-linux-project.md)
14
14
15
15
## Add a Linux configuration
16
16
17
-
A configuration can be used to target different platforms (Windows, WSL, a remote system) with the same source code. A configuration is also used to set your compilers, pass environment variables, and customize how CMake is invoked. The *CMakeSettings.json* file specifies some or all of the properties listed in [Customize CMake settings](../build/customize-cmake-settings.md), plus additional properties that control the build settings on the remote Linux machine.
17
+
A configuration can be used to target different platforms (Windows, WSL, a remote system) with the same source code. A configuration is also used to set your compilers, pass environment variables, and customize how CMake is invoked. The *CMakeSettings.json* file specifies some or all of the properties listed in [Customize CMake settings](../build/customize-cmake-settings.md), plus other properties that control the build settings on the remote Linux machine.
18
18
::: moniker-end
19
19
20
20
::: moniker range="msvc-150"
@@ -24,27 +24,36 @@ The default configuration for Linux-Debug in Visual Studio 2017 (and Visual Stud
@@ -55,16 +64,18 @@ To change the default CMake settings in Visual Studio 2019 or later, from the ma
55
64
56
65

57
66
58
-
This command opens the **CMake Settings Editor**, which you can use to edit the *CMakeSettings.json* file in your root project folder. You can also open the file with the JSON editor by clicking the **Edit JSON** button in the editor. For more information, see [Customize CMake Settings](../build/customize-cmake-settings.md).
67
+
This command opens the **CMake Settings Editor**, which you can use to edit the *CMakeSettings.json* file in your root project folder. You can also open the file with the JSON editor by clicking the **Edit JSON** button in the upper-right of the **CMake Settings** dialog. For more information, see [Customize CMake Settings](../build/customize-cmake-settings.md).
59
68
60
69
The default Linux-Debug configuration in Visual Studio 2019 version 16.1, and later, looks like this:
When you open a CMake project folder, Visual Studio parses the *CMakeLists.txt* file and specifies a Windows target of **x86-Debug**. To target a remote Linux system, you'll change the project settings based on your Linux compiler. For example, if you are using GCC on Linux and compiling with debug info, you'll chose: **Linux-GCC-Debug** or **Linux-GCC-Release**.
111
+
When you open a CMake project folder, Visual Studio parses the *CMakeLists.txt* file and specifies a Windows target of **x86-Debug**. To target a remote Linux system, you'll change the project settings based on your Linux compiler. For example, if you're using GCC on Linux and compiling with debug info, choose: **Linux-GCC-Debug** or **Linux-GCC-Release**.
102
112
103
113
If you specify a remote Linux target, your source is copied to the remote system.
104
114
@@ -121,7 +131,7 @@ The **CMakeSettings.json** window appears.
121
131
122
132

123
133
124
-
Press **Add Configuration** (the green '+' button) and then choose **Linux-GCC-Debug** or **Linux-GCC-Release** if using GCC. Use the Clang variants if you are using the Clang/LLVM toolset. Press **Select** and then **Ctrl+S** to save the configuration.
134
+
Press **Add Configuration** (the green '+' button) and then choose **Linux-GCC-Debug** or **Linux-GCC-Release** if using GCC. Use the Clang variants if you're using the Clang/LLVM toolset. Press **Select** and then **Ctrl+S** to save the configuration.
125
135
126
136
**Visual Studio 2019 version 16.1** When you target WSL, Visual Studio doesn't need to copy source files and maintain two synchronous copies of your build tree because the compiler on Linux has direct access to your source files in the mounted Windows file system.
127
137
::: moniker-end
@@ -135,7 +145,7 @@ Accurate C++ IntelliSense requires access to the C++ headers referenced by your
135
145
136
146
Visual Studio language settings aren't propagated to Linux targets because Visual Studio doesn't manage or configure installed packages. Messages shown in the Output window, such as build errors, are shown using the language and locale of the Linux target. You'll need to configure your Linux targets for the desired locale.
137
147
138
-
## Additional settings
148
+
## More settings
139
149
140
150
Use the following settings to run commands on the Linux system before and after building, and before CMake generation. The values can be any command that is valid on the remote system. The output is piped back to Visual Studio.
0 commit comments