Added provision to pass misc flags to cmake#89
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 |
| :group 'cmake-ide | ||
| :safe #'stringp) | ||
|
|
||
| (defcustom cmake-ide-cmake-command-flags |
|
@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.
This should be a list of strings, no?
There was a problem hiding this comment.
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.
| (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.
I just changed the number of jobs to 2 - you can use the previous configuration itself
There was a problem hiding this comment.
I just changed the number of jobs to 2 - you can use the previous configuration itself
There was a problem hiding this comment.
Right, but why? This should be at least configureable.
There was a problem hiding this comment.
what do you think if we add this settings as cmake-ide-rdm-options?
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-flagswhich 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