Function: projectile--cmake-command-presets
projectile--cmake-command-presets is a byte-compiled function defined
in projectile.el.
Signature
(projectile--cmake-command-presets FILENAME COMMAND-TYPE)
Documentation
Get CMake COMMAND-TYPE presets from FILENAME. Follows included files.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile--cmake-command-presets (filename command-type)
"Get CMake COMMAND-TYPE presets from FILENAME. Follows included files."
;; Anchor FILENAME to the project root before taking its directory:
;; the top-level call passes a relative name, whose `file-name-directory'
;; is nil, and included files must resolve relative to the file that
;; includes them - not to `default-directory'.
(let ((filename (projectile-expand-root filename)))
(when-let* ((preset (projectile--cmake-read-preset filename)))
(append
(projectile--cmake-command-presets-shallow filename command-type)
(mapcan
(lambda (included-file) (projectile--cmake-command-presets
(expand-file-name included-file (file-name-directory filename))
command-type))
(gethash "include" preset))))))