diff --git a/.emacs b/.emacs index 7a4a73d..fa2c239 100644 --- a/.emacs +++ b/.emacs @@ -126,6 +126,10 @@ ;; Enable recursive minibuffers (setq enable-recursive-minibuffers t) + + (defconst atu/numprocs + (string-to-number (shell-command-to-string "nproc")) + "The number of processor on the system") ) @@ -630,8 +634,8 @@ (projectile-register-project-type 'cmake-cc #'atu/cmake-cc-inference :project-file "CMakeLists.txt" :configure "cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=On" - :compile "cmake --build build" - :test "cmake --build build --target check" + :compile (format "cmake --build build -j %d" atu/numprocs) + :test (format "cmake --build build -j %d --target check" atu/numprocs) :related-files-fn (list #'atu/cc-related-files