Function: projection-cmake-list-artifacts

projection-cmake-list-artifacts is an autoloaded and natively compiled function defined in projection-type-cmake.el.

Signature

(projection-cmake-list-artifacts)

Documentation

List CMake target artifacts.

Source Code

;; Defined in /nix/store/j6y921qbdmdqxjnd43iibapbig3p4hai-emacs-packages-deps/share/emacs/site-lisp/elpa/projection-20260614.1822/projection-type-cmake.el
(defun projection-cmake-list-artifacts ()
  "List CMake target artifacts."
  (let* ((build-directory
          (projection-cmake--build-directory 'expand))
         (build-directory-remote (file-remote-p build-directory))
         (build-directory (substring build-directory
                                     (when build-directory-remote
                                       (length build-directory-remote))))
         (targets (projection-cmake--file-api-target-config)))
    (let ((result nil))
      (dolist (target targets)
        (let-alist target
          (when-let* ((props
                       (alist-get .type projection-cmake--artifact-types nil nil #'string-equal)))
            (dolist (artifact .artifacts)
              (setq artifact (alist-get 'path artifact))
              (push
               `((name . ,artifact)
                 ,@props
                 (category . ,(concat "CMake "
                                      (string-remove-prefix
                                       "cmake-" (symbol-name (alist-get 'type props)))))
                 (arg0 . ,(f-join build-directory artifact)))
               result)))))
      (nreverse result))))