This is an automated email from the ASF dual-hosted git repository.

philo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new c1deb127a [DOC] Document how to use cmake-format in vs code (#6089)
c1deb127a is described below

commit c1deb127a4f818866ecd311168688af4215aadd5
Author: PHILO-HE <[email protected]>
AuthorDate: Fri Jun 14 15:42:33 2024 +0800

    [DOC] Document how to use cmake-format in vs code (#6089)
---
 docs/developers/NewToGluten.md | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/docs/developers/NewToGluten.md b/docs/developers/NewToGluten.md
index a397003ad..54f379148 100644
--- a/docs/developers/NewToGluten.md
+++ b/docs/developers/NewToGluten.md
@@ -289,6 +289,26 @@ Search `default formatter` in `Settings`, select 
Clang-Format.
 
 If your formatOnSave still make no effect, you can use shortcut `SHIFT+ALT+F` 
to format one file manually.
 
+### Cmake format
+
+To format cmake files, like CMakeLists.txt & *.cmake, please install 
`cmake-format`.
+```
+pip3 install --user cmake-format
+```
+Here is an example to format a file in command line.
+```
+cmake-format --first-comment-is-literal True --in-place 
cpp/velox/CMakeLists.txt
+```
+
+After the above installation, you can optionally do some configuration in 
Visual Studio Code to easily format cmake files.
+1. Install `cmake-format` extension in Visual Studio Code.
+2. Configure the extension. To do this, open the settings (File -> Preferences 
-> Settings), search for `cmake-format`,
+   and do the below settings:
+   * Set Args: `--first-comment-is-literal=True`.
+   * Set Exe Path to the path of the `cmake-format` command. If you installed 
`cmake-format` in a standard
+      location, you might not need to change this setting.
+3. Now, you can format your CMake files by right-clicking in a file and 
selecting `Format Document`.
+
 # Debug cpp code with coredump
 
 ```bash


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to