cmake-ide icon indicating copy to clipboard operation
cmake-ide copied to clipboard

Support source file blacklist

Open MaskRay opened this issue 8 years ago • 6 comments

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

MaskRay avatar Oct 08 '17 21:10 MaskRay

What's the use case?

atilaneves avatar Oct 10 '17 09:10 atilaneves

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. https://github.com/Andersbakken/rtags/issues/1007

MaskRay avatar Oct 11 '17 03:10 MaskRay

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?

atilaneves avatar Oct 11 '17 08:10 atilaneves

maybe a variable that turns off running cmake automatically

That will be useful!

MaskRay avatar Oct 12 '17 04:10 MaskRay

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.

atilaneves avatar Oct 17 '17 13:10 atilaneves

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.

xinquanatcolezhu avatar Oct 19 '17 06:10 xinquanatcolezhu