-
Notifications
You must be signed in to change notification settings - Fork 92
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
Added provision to pass misc flags to cmake #89
base: master
Are you sure you want to change the base?
Conversation
committing from base
useful patch (y) |
@myrgy I agree this is useful but the review comments were not addressed. |
atilaneves , could you please describe the issue with that PR. P.S. |
@myrgy My comments on the original PR are still visible. |
@atilaneves I can't really see the review comments |
@@ -124,6 +124,12 @@ | |||
:group 'cmake-ide | |||
:safe #'stringp) | |||
|
|||
(defcustom cmake-ide-cmake-command-flags |
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.
just test comment
@atilaneves , @Nidish96 I'm very sorry, but I can't see review comments as well. |
Ugh, I seem to have forgotten to actually commit the review, sorry about that. |
nil | ||
"List of misc flags passed to the cmake invocation." | ||
:group 'cmake-ide | ||
:safe #'stringp) |
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.
This should be a list of strings, no?
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.
Hi, I have done something similar, and a string seems fine, you can set it to a bunch of option (like -DCMAKE_BUILD_TYPE=Debug -DOtherUsefullDef"
Then, I set it to "-DCMAKE_BUILD_TYPE=Debug" by default and use it to define the build directory.
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.
my bad - it should be listp
@@ -944,6 +952,7 @@ the object file's name just above." | |||
(cmake-ide--message "Starting rdm server") | |||
(with-current-buffer buf (start-process "rdm" (current-buffer) | |||
cmake-ide-rdm-executable | |||
"-j 2" "-i 40" "-a 10" |
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.
?
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.
I just changed the number of jobs to 2 - you can use the previous configuration itself
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.
I just changed the number of jobs to 2 - you can use the previous configuration itself
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.
Right, but why? This should be at least configureable.
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.
what do you think if we add this settings as cmake-ide-rdm-options?
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.
@myrgy That makes sense.
In invoking cmake from emacs, previously there was no provision to pass flags to cmake. For example, it was not possible to specify the build type or install prefix, etc.
The current commit replaces the
(start-process "cmake" ...)
call with(apply #'start-process "cmake" ...)
and defines a list,cmake-ide-cmake-command-flags
which is initialized to nil and may be set in .dir-locals.el.example (in .dir-locals.el):
((nil . ((cmake-ide-project-dir . "path/to/project") (cmake-ide-build-dir . "path/to/build") (cmake-ide-make-command . "make install") (cmake-ide-cmake-command-flags . ("-DCMAKE_INSTALL_PREFIX=/path/to/install" "-DCMAKE_BUILD_TYPE=Debug")))))
PS: Forgive me for the awful commits - am just learning to use magit on emacs :P