Function: projectile-compilation-dir

projectile-compilation-dir is a byte-compiled function defined in projectile.el.

Signature

(projectile-compilation-dir &optional BASE)

Documentation

Retrieve the compilation directory for this project.

BASE, when non-nil, is the directory the project type's compilation directory is resolved against instead of the project root - a subproject's root, say, so a Meson module builds in its own build directory rather than the repository's.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
;;; Lifecycle commands
;;
;; Configure, compile, test, install, package and run: the six phases a
;; project is driven through from Projectile.  Each resolves its command
;; the same way (cache, then .dir-locals.el, then the project type's
;; default), remembers what you ran, and hands it to `compile'.  The
;; subproject variants at the end of the section are the same six, scoped
;; to the part of a monorepo you're in.


(defun projectile-compilation-dir (&optional base)
  "Retrieve the compilation directory for this project.

BASE, when non-nil, is the directory the project type's compilation
directory is resolved against instead of the project root - a
subproject's root, say, so a Meson module builds in its own `build'
directory rather than the repository's."
  (let* ((base (or base (projectile-acquire-root)))
         (type (projectile-project-type base))
         (comp-dir (or projectile-project-compilation-dir
                       (projectile-default-compilation-dir type))))
    (if comp-dir
        (expand-file-name (file-name-as-directory comp-dir) base)
      base)))