aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJohn Eivind Helset <jehelset@gmail.com>2021-03-07 14:27:53 +0100
committerBozhidar Batsov <bozhidar.batsov@gmail.com>2021-05-25 09:15:47 +0300
commite627bd71ae776ff0ce043d430467ae21a2954f4e (patch)
tree239da62f171050c3ba4a6230cfe891659994830e /doc
parentb63d03532b0efe536ed140d57bbdf150e37cc64c (diff)
Add support for CMake configure, build and test presets.
Introduce a `projectile--cmake-command`, for CMake projects parametrized on command-type, and route configure, build and test commands for cmake projects through this. This command ensures that presets for the given command-type is supported by the installed version of CMake, that `json-parse-buffer` is available, that the user has opted in to preset support through the `projectile-enable-cmake-presets` custom, and that there is at least one preset available for the given command type. If all these conditions hold it parses the preset files and prompts the user to select a preset, or to opt-out of preset configuration, and creates a manual or preset command based on the users selection. Else it will revert to manual configuration.
Diffstat (limited to 'doc')
-rw-r--r--doc/modules/ROOT/pages/configuration.adoc8
-rw-r--r--doc/modules/ROOT/pages/projects.adoc3
2 files changed, 11 insertions, 0 deletions
diff --git a/doc/modules/ROOT/pages/configuration.adoc b/doc/modules/ROOT/pages/configuration.adoc
index b7e646f..8b9fee8 100644
--- a/doc/modules/ROOT/pages/configuration.adoc
+++ b/doc/modules/ROOT/pages/configuration.adoc
@@ -501,3 +501,11 @@ NOTE: The project name & type will not appear when editing remote files
(via TRAMP), as recalculating the project name is a fairly slow operation there
and would slow down a bit opening the files. They will also not appear for
non-file buffers, as they get updated via `find-file-hook`.
+
+== Project-type-specific Configuration
+
+=== CMake
+
+Projectile supports https://cmake.org/cmake/help/git-stage/manual/cmake-presets.7.html[CMake presets]. Preset support is disabled by default, but can be enabled by setting `projectile-enable-cmake-presets` to non-nil. With preset-support enabled Projectile will parse the preset files and present the command-specific presets when executing a lifecycle command. In addition a `*no preset*` option is included for entering the command manually.
+
+NOTE: Preset support requires a CMake version that supports preset and for `json-parse-buffer` to be available.
diff --git a/doc/modules/ROOT/pages/projects.adoc b/doc/modules/ROOT/pages/projects.adoc
index 9901f44..57b1227 100644
--- a/doc/modules/ROOT/pages/projects.adoc
+++ b/doc/modules/ROOT/pages/projects.adoc
@@ -124,6 +124,9 @@ are the configuration files of various build tools. Out of the box the following
| Makefile
| Make
+| CMakeLists.txt
+| CMake
+
| WORKSPACE
| Bazel workspace file