Skip to content
Open
1 change: 1 addition & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* Include C++ include dirs code
* Ensure compile commands directories do not duplicate
11 changes: 10 additions & 1 deletion cmake-ide.el
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@
:group 'cmake-ide
:safe #'stringp)

(defcustom cmake-ide-cmake-command-flags

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just test comment

nil
"List of misc flags passed to the cmake invocation."
:group 'cmake-ide
:safe #'stringp)

Copy link
Copy Markdown
Owner

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?

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Author

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


(defcustom cmake-ide-header-search-other-file
t
"Whether or not to search for a corresponding source file for headers when setting flags for them."
Expand Down Expand Up @@ -559,7 +565,9 @@ the object file's name just above."
(when project-dir
(let ((default-directory cmake-dir))
(cmake-ide--message "Running cmake for src path %s in build path %s" project-dir cmake-dir)
(start-process "cmake" "*cmake*" cmake-ide-cmake-command "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" project-dir))))
(apply #'start-process "cmake" "*cmake*" cmake-ide-cmake-command project-dir
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" cmake-ide-cmake-command-flags)
)))


(defun cmake-ide--get-build-dir ()
Expand Down Expand Up @@ -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"

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Copy Markdown
Author

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

Copy link
Copy Markdown
Author

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

Copy link
Copy Markdown
Owner

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.

Copy link
Copy Markdown

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?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@myrgy That makes sense.

"-c" cmake-ide-rdm-rc-path))))))

(defun cmake-ide--process-running-p (name)
Expand Down