automatically parallelize C/C++ cmake builds
This commit is contained in:
8
.emacs
8
.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
|
||||
|
||||
Reference in New Issue
Block a user