-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can specific cmake generator to use when building #97
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,11 @@ | |
(unless module-file-suffix | ||
(error "Module support not detected, libgit can't work")) | ||
|
||
(defcustom libgit-cmake-generator nil | ||
"CMake generator to use." | ||
:type 'string | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It can, and by default is, |
||
:group 'libgit) | ||
|
||
(defvar libgit--root | ||
(file-name-directory (or load-file-name buffer-file-name)) | ||
"Directory where libgit is installed.") | ||
|
@@ -51,7 +56,9 @@ On successful exit, pass control on to the build step." | |
(make-directory libgit--build-dir 'parents) | ||
(let ((default-directory libgit--build-dir)) | ||
(set-process-sentinel | ||
(start-process "libgit-cmake" "*libgit build*" "cmake" "..") | ||
(if libgit-cmake-generator | ||
(start-process "libgit-cmake" "*libgit build*" "cmake" ".." "-G" libgit-cmake-generator) | ||
(start-process "libgit-cmake" "*libgit build*" "cmake" "..")) | ||
(lambda (proc _event) | ||
(when (eq 'exit (process-status proc)) | ||
(if (= 0 (process-exit-status proc)) | ||
|
@@ -65,7 +72,7 @@ On successful exit, pass control on to the build step." | |
On successful exit, pass control on to the load step." | ||
(let ((default-directory libgit--build-dir)) | ||
(set-process-sentinel | ||
(start-process "libgit-cmake" "*libgit build*" "make") | ||
(start-process "libgit-cmake" "*libgit build*" "cmake" "--build" ".") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cmake will default to the platforms default. It could also make sense to pass -S to cmake to avoid changing the directory to the source directory. E.g. cmake -B buildir -S sources. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the feedback, but I have decided to close this until @vconcat gets back to this and makes the requested change and provides all the necessary information in the commit message. |
||
(lambda (proc _event) | ||
(when (eq 'exit (process-status proc)) | ||
(if (= 0 (process-exit-status proc)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Someone who is not familiar with cmake (like me), should still be able to understand what this is all about. As I understand it, this creates build instructions that can later be used by
cmake --build
instead of creating a Makefile later to be used bymake
.