From d3f0162d3abdea853d5c56b939b4fbf6c027e204 Mon Sep 17 00:00:00 2001 From: Hauke Rehfeld Date: Fri, 6 Dec 2013 11:59:52 +0100 Subject: [PATCH] fix: if cmake-project-build-directory is existing, use that instead of resetting it This allows to use e.g. dir-locals for configuring the binary dir --- cmake-project.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake-project.el b/cmake-project.el index 5220329..7aaef51 100644 --- a/cmake-project.el +++ b/cmake-project.el @@ -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)