Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Exclude Directory/Files from indexing - failure(Exclude Directory/Files from indexing not working)
Exclude Directory/Files from indexing - failure [message #1794060] Thu, 23 August 2018 05:18 Go to next message
Open Address is currently offline Open AddressFriend
Messages: 3
Registered: January 2018
Junior Member
I am using Eclipse - Photon, CDT 9.5.2.201807181141.

Trying to index llvm+clang sources using Eclipse project generated by cmake. "Enabled Project specific settings" of project indexer.

Indexer gets stuck on https://github.com/llvm-mirror/clang/blob/master/test/Modules/merge-template-specializations.cpp which is cloned as <llvm-repo>/tools/clang/test/Modules/merge-template-specializations.cpp. So, to side-step this issue, I'd like to exclude the directory <llvm-repo>/tools/clang/test/Modules from indexing (but not from build). The path <llvm-repo>/tools/clang/test is in the list "C/C++ Include Paths and Symbols". I added the "Exclusion Filter" of that path as "Modules/". The indexer does not skip the files in that directory. I also tried various variants of Exclusion Filters such as "**/Modules/*", "<llvm-repo>/tools/clang/test/Modules/", "<llvm-repo>/tools/clang/test/Modules/*" and "[Source directory]/tools/clang/test/Modules/". None of them make the indexer skip files in Modules directory.

Can some one please tell me what I am missing?

Thanks!
Re: Exclude Directory/Files from indexing - failure [message #1794109 is a reply to message #1794060] Thu, 23 August 2018 17:14 Go to previous messageGo to next message
David VavraFriend
Messages: 772
Registered: October 2012
Senior Member
I don't think it's possible to set an Eclipse option to exclude a file from indexing but still include it in the build.

Two ways this could be done:
o) Create your own makefile.
o) Surround your code with
#ifndef __CDT_PARSER__
:
:
:
#endif


If by "Exclusion Filter" you mean a Resource Filter
i.e., Project --> Properties --> Resource --> Resource Filter
then it keeps files from being added to the workspace.
Anyway, that's what the note at the top of the dialog says.
I've never used it.

If you mean the Project Explorer menu item Filters and Customization ...
then it only hides the files from the Project Explorer view.


[Updated on: Thu, 23 August 2018 17:33]

Report message to a moderator

Re: Exclude Directory/Files from indexing - failure [message #1794112 is a reply to message #1794109] Thu, 23 August 2018 18:56 Go to previous message
Open Address is currently offline Open AddressFriend
Messages: 3
Registered: January 2018
Junior Member
Thanks for your reply. It is (slightly?) disappointing that there is no way for me to exclude files/directories from being processed by the indexer irrespective of those being part of the build.

Anyway, as I said, I am only attempting to exclude in order to side-step an apparent hang (or extreme slowness) while indexing some of the files in the llvm/clang repo. So, I do not feel I have a very strong case for that feature.

However, coming back to the original problem I am facing, it would be useful if the the indexer would not hang (or take hours) to index files such as
https://github.com/llvm-mirror/clang/blob/master/test/Modules/merge-template-specializations.cpp
and
https://github.com/llvm-mirror/clang/blob/master/test/Modules/tag-injection.cpp
Previous Topic:How setup debugging with LLDB and Eclipse Photon under macOS 10.13.5
Next Topic:[SOLVED] No Output in Console
Goto Forum:
  


Current Time: Wed Sep 19 06:40:13 GMT 2018

Powered by FUDForum. Page generated in 0.01469 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top