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

Support source file blacklist #135

Open
MaskRay opened this issue Oct 8, 2017 · 6 comments
Open

Support source file blacklist #135

MaskRay opened this issue Oct 8, 2017 · 6 comments

Comments

@MaskRay
Copy link

MaskRay commented Oct 8, 2017

A customization variable for source file blacklist. For those paths, do not call cmake-ide--locate-cmakelists automatically.

;;;###autoload
(defun cmake-ide-maybe-run-cmake ()
  "Run CMake if the compilation database JSON file is not found."
  (interactive)
  (cmake-ide-maybe-start-rdm)
  (if (cmake-ide--need-to-run-cmake)
      (cmake-ide-run-cmake)
    (progn
      (cmake-ide--add-file-to-buffer-list)
      (cmake-ide--on-cmake-finished))))
@atilaneves
Copy link
Owner

What's the use case?

@MaskRay
Copy link
Author

MaskRay commented Oct 11, 2017

For a large project (say llvm), doing a cmake every time is painful. It should be controlled by the user, not done in the background.

For some filesystem, stat may take non-negligible time or stat-like syscalls are not desirable. Should not run cmake in that case.

This point is not an argument.
rtags has a serious issue, it has 6 files for each indexed source file. For larger project like Linux (34000+ C files), it takes extremely long time to do the initial load and it goes through all files to serve a request. Andersbakken/rtags#1007

@atilaneves
Copy link
Owner

I guess you mean it's slow when you visit a new file?

CMake isn't run every time, but stat calls might indeed be issued.

I don't think a source file blacklist would be the way forward for this use case, but maybe a variable that turns off running cmake automatically. Would that be ok?

@MaskRay
Copy link
Author

MaskRay commented Oct 12, 2017

maybe a variable that turns off running cmake automatically

That will be useful!

@atilaneves
Copy link
Owner

I was looking at the source today to add the variable, but @MaskRay: are you sure the problem is cmake running? After running the first time, cmake should only run if you add a file to the project.

@xinquanatcolezhu
Copy link

that's would be very useful.

sometimes when I visit a file occasionally, i just want to have a peak of the source code in another project
having a way to control what folder or files run cmake-ide would be very very nice!!!

i am having the problem of having so many cmake tmp files in my /tmp cucrrently as I am navigating many projecs which also makes the RC and RDM slow.

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