-
Notifications
You must be signed in to change notification settings - Fork 502
Consolidate CMake Tools documentation #1324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still reviewing... Submitting a few comments for the files I got through this morning.
docs/changelog.md
Outdated
@@ -0,0 +1,127 @@ | |||
# Changelog and History |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My impression is that we don't need to keep this legacy changelog around. I'd be fine if you deleted it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I assume I should continue to point to What's new (from the faq) at https://github.com/microsoft/vscode-cmake-tools/blob/develop/CHANGELOG.md (this is the current changelog, I think)
docs/cmake-settings.md
Outdated
|
||
### Command substitution | ||
|
||
CMake Tools can expand VS Code commands. for example, you can expand the `launch.json` command using the syntax `${command:launch.json}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
launch.json
is not a command. A better example would be ${command:cmake.launchTargetPath}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
docs/configure.md
Outdated
|
||
## How CMake Tools configures | ||
|
||
CMake Tools drives CMake via CMake Server, an execution mode of CMake that provides a persistent connection to get project information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use CMake Server for older versions of Cmake (3.7 - 3.14, I believe). If using version 3.14.6 or newer, we use cmake-file-api which provides the project information via a file that is persisted to disk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we document what we currently have, rather than the history of where we've been, I changed this to say that it uses the cmake-file-api and dropped mention of cmake server.
There was another reference to the cmake server in this topic, which I also changed. It talked about setting environment variables for the cmake server process. I changed it like so: "CMake Tools sets environment variables necessary to use the selected Visual Studio installation, and sets CC
and CXX
to cl.exe
so that CMake will detect the Visual C++ compiler as the primary compiler, even if other compilers like GCC are present on $Path
."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work here, I left a few comments.
docs/cmake-settings.md
Outdated
@@ -0,0 +1,66 @@ | |||
# Configure CMake tools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's always confusing to me that we use the word 'configure' as a specific step in the CMake build process AND as a general verb. I run into this, too. Any way we can use a different word here? Glancing through the TOC it's potentially confusing that there is a section called "Configure" and a section called "Configure CMake Tools". Maybe the latter can be "CMake Tools Settings"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was confusing me too. I left it because I assumed it was terminology that the cmake community was familiar with. I like your idea for CMake tools settings and will ripple that change through the various articles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the configure.md and cmake-settings.md files to try to separate these ideas. I have the concept of configuring CMake tools, which I've renamed CMake tool settings, and then in configure.md I tried to be more clear about the 'CMake configure process' and changed headings accordingly.
@@ -0,0 +1,66 @@ | |||
# Configure CMake tools | |||
|
|||
CMake Tools supports a variety of settings that can be set at the user, or workspace, level via VSCode's `settings.json` file. This topic covers the available options and how they are used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a link to learn about user vs workspace settings?
https://code.visualstudio.com/docs/getstarted/settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. Done.
|
||
## CMake settings | ||
|
||
|Setting |Description | Default value | Supports substitution | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two commands we've added since taking over the extension that aren't captured here:
cmake.autoSelectActiveFolder | If 'false', your active folder will only change if you manually run the CMake: Select Active Folder command | 'true' | no
cmake.cmakeCommunicationMode | Specifies the protocol used to communicate between the extension and CMake | 'automatic' | no
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
docs/debug-launch.md
Outdated
If you define any executable targets via CMake, CMake Tools will be aware of them and allow you to start debugging them. | ||
|
||
> **Note:** | ||
> Debugging is only supported when CMake is in _CMake Server_ mode. This mode is enabled automatically for CMake versions 3.7.2 and above. It is not available on older versions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be "...when CMake is using CMake server mode or file-based API. These modes are enabled automatically...." (or something to show that debugging is supported by both CMake server mode and file-based API)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed this to read: Debugging is supported when CMake is using either CMake Server or the cmake-file-api. These modes are enabled automatically for CMake versions 3.7.2 and above. Debugging is not available on older versions.
docs/kits.md
Outdated
You can manually edit this file to define new global kits. The contents of this file will be automatically updated by CMake Tools during a [scan for kits](#scan-for-kits). | ||
|
||
> **Warning:** | ||
> Don't modify kits that the CMake Tools extension creates because your changes will be overwritten during the next [scan for kits](#scan-for-kits). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add something - "You should instead define a new kit with you desired modifications" to be explicit about the preferred behavior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I modified this section to read:
You can manually edit this file to define new global kits, however the contents of this file will be automatically updated by CMake Tools during a scan for kits.
Tip:
Define a new kit with your desired settings rather than modify kits that the CMake Tools extension creates so that your changes aren't overwritten during the next scan for kits.
…ools into twhitney-cmakeLibrary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much @TylerMSFT!
This consolidates all of the CMake Tools documentation.
The purpose of this change
Bring all of the documentation on the previous site, to the Microsoft CMake Tools github.