[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/projectile 9bb74c80e9 1/2: Add package command for CMake (
|
From: |
ELPA Syncer |
|
Subject: |
[nongnu] elpa/projectile 9bb74c80e9 1/2: Add package command for CMake (#1870) |
|
Date: |
Wed, 29 Nov 2023 13:00:53 -0500 (EST) |
branch: elpa/projectile
commit 9bb74c80e96c51ca9ecd2b670fd374ffff3a1b5b
Author: jehelset <47066444+jehelset@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
Add package command for CMake (#1870)
---
CHANGELOG.md | 2 ++
projectile.el | 12 ++++++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bba3f12b38..f5fcb7b653 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,8 @@
## master (unreleased)
+* [#1870](https://github.com/bbatsov/projectile/pull/1870): Add package
command for CMake projects.
+
## 2.8.0 (2023-10-13)
### New features
diff --git a/projectile.el b/projectile.el
index ed1894a610..b7012780a7 100644
--- a/projectile.el
+++ b/projectile.el
@@ -3061,6 +3061,7 @@ it acts on the current project."
'((:configure-command . (3 19))
(:compile-command . (3 20))
(:test-command . (3 20))
+ (:package-command . (3 19))
(:install-command . (3 20))))
(defun projectile--cmake-command-presets-supported (command-type)
@@ -3081,6 +3082,7 @@ it acts on the current project."
'((:configure-command . "configurePresets")
(:compile-command . "buildPresets")
(:test-command . "testPresets")
+ (:package-command . "packagePresets")
(:install-command . "buildPresets")))
(defun projectile--cmake-command-preset-array-id (command-type)
@@ -3095,7 +3097,7 @@ it acts on the current project."
(gethash (projectile--cmake-command-preset-array-id command-type)
preset))))
(defun projectile--cmake-command-presets (filename command-type)
- "Get CMake COMMAND-TYPE presets from FILENAME. Follows included files"
+ "Get CMake COMMAND-TYPE presets from FILENAME. Follows included files."
(when-let ((preset (projectile--cmake-read-preset (projectile-expand-root
filename))))
(append
(projectile--cmake-command-presets-shallow filename command-type)
@@ -3157,6 +3159,7 @@ select a name of a command preset, or opt a manual
command by selecting
'((:configure-command . "cmake -S . -B build")
(:compile-command . "cmake --build build")
(:test-command . "cmake --build build --target test")
+ (:package-command . "cmake --build build --target package")
(:install-command . "cmake --build build --target install")))
(defun projectile--cmake-manual-command (command-type)
@@ -3167,6 +3170,7 @@ select a name of a command preset, or opt a manual
command by selecting
'((:configure-command . "cmake . --preset %s")
(:compile-command . "cmake --build --preset %s")
(:test-command . "ctest --preset %s")
+ (:package-command . "cpack --preset %s")
(:install-command . "cmake --build --preset %s --target install")))
(defun projectile--cmake-preset-command (command-type preset)
@@ -3205,6 +3209,10 @@ a manual COMMAND-TYPE command is created with
"CMake install command."
(projectile--cmake-command :install-command))
+(defun projectile--cmake-package-command ()
+ "CMake package command."
+ (projectile--cmake-command :package-command))
+
;;; Project type registration
;;
;; Project type detection happens in a reverse order with respect to
@@ -3289,7 +3297,7 @@ a manual COMMAND-TYPE command is created with
:compile #'projectile--cmake-compile-command
:test #'projectile--cmake-test-command
:install #'projectile--cmake-install-command
- :package "cmake --build build --target
package")
+ :package #'projectile--cmake-package-command)
;; go-task/task
(projectile-register-project-type 'go-task '("Taskfile.yml")
:project-file "Taskfile.yml"