Skip to content

Commit

Permalink
fix: if cmake-project-build-directory is existing, use that instead o…
Browse files Browse the repository at this point in the history
…f resetting it

This allows to use e.g. dir-locals for configuring the binary dir
  • Loading branch information
Hauke Rehfeld committed Dec 6, 2013
1 parent d7b3e14 commit d3f0162
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmake-project.el
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,10 @@ build tools such as the CompileCommand and Flymake."

(make-local-variable 'cmake-project-build-directory)
(make-local-variable 'compile-command)

(cmake-project--changed-build-directory (cmake-project-find-build-directory))
(let ((build-directory (if cmake-project-build-directory
cmake-project-build-directory
(cmake-project-find-build-directory))))
(cmake-project--changed-build-directory build-directory))

(ad-enable-advice
'flymake-get-file-name-mode-and-masks 'around 'cmake-flymake-advice)
Expand Down

0 comments on commit d3f0162

Please sign in to comment.