Support source file blacklist #135

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

Comments

Projects
None yet
3 participants

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))))
Owner

atilaneves commented Oct 10, 2017

What's the use case?

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

Owner

atilaneves commented Oct 11, 2017

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 commented Oct 12, 2017

maybe a variable that turns off running cmake automatically

That will be useful!

Owner

atilaneves commented Oct 17, 2017

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.

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