Support source file blacklist
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))))
What's the use case?
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
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?
maybe a variable that turns off running cmake automatically
That will be useful!
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.