Skip to content
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

multiple instances of rdm server for multiple projects #91

Open
yavitzour opened this issue Feb 22, 2017 · 9 comments
Open

multiple instances of rdm server for multiple projects #91

yavitzour opened this issue Feb 22, 2017 · 9 comments

Comments

@yavitzour
Copy link

Hi,

Inside rtags.el (starting at line 259) there is a suggestion to start multiple instances of rdm to handle multiple projects (the exact mechanism is explained there). Since cmake-ide already starts an rdm instance if one isn't running, can it start a new one for each project (especially useful in conjunction with the persistant-naming option)?

@atilaneves
Copy link
Owner

It could start an instance per project but that'd be tricky to implement and not something I'm terribly interested in. PRs welcome though.

@dlyr
Copy link
Contributor

dlyr commented Mar 6, 2017

Hi there, I rediscover emacs as an ide, and give a try to cmake-ide. Is this issue related to the fact I can't open two CMakeLists.txt and compile them with the same running emacs ? or in fact it is possible but I'm wrong ... I'm not familiar with rtags and rdm, so I'm not sure I can try to find a patch but can investigate.
++ d

@atilaneves
Copy link
Owner

Two CMakeLists.txt in the same project or different projects?

@dlyr
Copy link
Contributor

dlyr commented Mar 9, 2017

Two CMakeLitsts.txt for two diffrents projects,
something like
/project1/CMakeLists.txt < the one I want to run cmake on
/project1/many_sub_dirs_with_included/CMakeLists.txt
/project2/CMakeLists.txt < the second I want to run cmake on
/project2/many_sub_dirs_with_included/CMakeLists.txt

By the way, something I do wrong was to call cmake-ide-run-cmake from CMakeLists.txt (then rdm failed to lauch ...) If I call cmake-ide-run-cmake from a subsequent source file, rdm start fines from emacs.

It may be another issue in fact
I use (setq cmake-ide-build-pool-use-persistent-naming t), but the pb is still present without this options

@atilaneves
Copy link
Owner

Two projects should work fine. I don't remember ever seeing an issue.

@dlyr
Copy link
Contributor

dlyr commented Mar 13, 2017

Ok, I will check further (no time right now, two instance of emacs are fine)

@dlyr
Copy link
Contributor

dlyr commented Jun 16, 2017

Hi, maybe I should open another issue, but to answer my question, it seems that there is only one value for cmake-ide-build-dir, and once set, it is used for all the opened file.

(defun cmake-ide--get-build-dir ()
  "Return the directory name to run CMake in."
  (if (not (cmake-ide--build-dir-var))

I also try to have cmake-ide--get-build-dir dependent on cmake options (to have one build dir for debug, another one for release) by adding a cmake-opt custom variable, but I'm not sure I get the "idb" thing.
++ d

@atilaneves
Copy link
Owner

The way to do use cmake-ide-build-dir "properly" is to use directory local variables.

@dlyr
Copy link
Contributor

dlyr commented Jun 17, 2017

I'm still testing, but I will propose a pull request adding an hashtable of build-dir and cmake-ide-cmake-opts that allows to change opts during emacs session and keep build directories (to save compil time if I set back cmake opt to a previous value). I have only tested with persistent build directory yet (and a friend suggest to also make compiler dependent dir, if you want to switch back and forth between compilers). see https://github.com/dlyr/cmake-ide/tree/debug_release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants