Skip to content

Commit

Permalink
Add a compilation-dir for cmake projects (#1509)
Browse files Browse the repository at this point in the history
  • Loading branch information
Liorst4 committed Mar 29, 2020
1 parent 588692a commit 87845d7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions projectile.el
Original file line number Diff line number Diff line change
Expand Up @@ -2584,7 +2584,8 @@ test/impl/other files as below:
:compile "make"
:test "make test")
(projectile-register-project-type 'cmake '("CMakeLists.txt")
:configure "cmake %s"
:compilation-dir "build"
:configure "cmake %s -B %s"
:compile "cmake --build ."
:test "ctest")
;; PHP
Expand Down Expand Up @@ -3795,7 +3796,7 @@ project of that type"
projectile-project-configure-cmd
(let ((cmd-format-string (projectile-default-configure-command (projectile-project-type))))
(when cmd-format-string
(format cmd-format-string (projectile-project-root))))))
(format cmd-format-string (projectile-project-root) compile-dir)))))

(defun projectile-compilation-command (compile-dir)
"Retrieve the compilation command for COMPILE-DIR.
Expand Down

0 comments on commit 87845d7

Please sign in to comment.