Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Code indexing based on build output (How to configure indexing based on build output)
Code indexing based on build output [message #1784740] Tue, 03 April 2018 12:04 Go to next message
vignesh manjunath is currently offline vignesh manjunathFriend
Messages: 3
Registered: April 2018
Junior Member
Hi All

Am using ccarm and cxarm compiler to build my project and which is integrated with CMake Tool chain

Currently when i import the project with "Existing Make file as project" option indexing happens for all the files

For Eg. If i put a call hierarchy for a function, all the references will be listed

As per my knowledge, this is since indexer happens generically and indexes all files which is not included in the build also

How to configure the indexing options to index as per the files included in the build or as per build output?
Re: Code indexing based on build output [message #1784775 is a reply to message #1784740] Tue, 03 April 2018 22:42 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
For Indexer options,
see Window --> Preferences --> C/C++ --> Indexer.
https://help.eclipse.org/oxygen/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Freference%2Fcdt_u_indexer_preference.html

EDIT:

Understand that all source files within a project are presumed included in a build unless specifically exempted.

You can exempt both files and directories.
Project view --> right click file/dir --> Resource Configurations -> Exempt from Build ...

[Updated on: Wed, 04 April 2018 08:33]

Report message to a moderator

Re: Code indexing based on build output [message #1786660 is a reply to message #1784775] Wed, 09 May 2018 05:47 Go to previous messageGo to next message
vignesh manjunath is currently offline vignesh manjunathFriend
Messages: 3
Registered: April 2018
Junior Member
Thank you for the response, can it be done dynamically based on the build output

i.e I can generate a file which specifies all files included in the build, using that can Include only those files for indexing ?

Thanks in advance
Re: Code indexing based on build output [message #1786680 is a reply to message #1786660] Wed, 09 May 2018 08:53 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
You can use the GCC Build Output Parser provider in
Project --> Properties --> C/C++ General --> Preprocessor Include Paths, Macros etc. --> Providers tab
Only works with GCC as far as I know.

Try turning off the Index source files not included in the build option in
Window --> Preferences --> C/C++ --> Indexer or
Project --> Preferences --> C/C ++ --> Indexer

The Output Parser adds directories found on the compile command lines in the build log.
I'm not really sure what not included in the build in the option actually means.
You may still have to manually exclude headers you don't want to see.
I don't know if this can be done on the files found under Includes in the Project View.

[Updated on: Wed, 09 May 2018 09:23]

Report message to a moderator

Previous Topic:How to force linker to keep section?
Next Topic:Eclipse builds with different sizes
Goto Forum:
  


Current Time: Thu Apr 25 16:12:55 GMT 2024

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

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

Back to the top