-
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
Conversation
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.
Um. Sorry for the delay!
@@ -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." |
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 by make
.
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
It can, and by default is, nil
. Also what would be a good non-nil value? Is there more than one non-nil value that even makes sense. Either way, a good non-nil value should be provided as a choice, that the user can select without having to learn more about Cmake first.
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Will cmake --build .
fallback to calling make
if we didn't specify a generator above?
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.
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 comment
The 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.
See inline comments. |
With these changes, user can build
libegit
under Windows with toolchain likemingw64-gcc
withoutmsys2
environment.See #83 (comment)
Also, user can specific
Ninja
generator when available for fast building.