Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Avoid to re-build projects which are referenced
Avoid to re-build projects which are referenced [message #1718822] Wed, 30 December 2015 18:10 Go to next message
Mickey Mouse is currently offline Mickey MouseFriend
Messages: 26
Registered: July 2012
Junior Member
Hi,

I am building a plugin for an external project, and to be able to inspect the source code of this third party I've added it as a project reference. That works fine, though when building the plugin it invokes `make' for the referenced project as well. While this causes no harm, as there is nothing to update, is there a way to disable this behaviour and having it to compile only the current project?

Thanks
Re: Avoid to re-build projects which are referenced [message #1718828 is a reply to message #1718822] Wed, 30 December 2015 20:16 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
The simple answer is don't link them. Are they linked for a reason?
If you were to build a makefile yourself, you would have to run make in all the referenced project yourself (read about recursive makes) just as Eclipse does. Eclipse depends on the way make is supposed to work. How should Eclipse determine if a build is needed until it runs make? Are you suggesting that Eclipse should duplicate what make does in whole or in part (and incur all the problems associated with adding bells and whistles) merely to avoid unnecessarily running it?


As you've said, it does no harm. The first rule in engineering (and programming is a type of engineering) is: if it ain't broke; don't fix it.

[Updated on: Wed, 30 December 2015 20:22]

Report message to a moderator

Re: Avoid to re-build projects which are referenced [message #1718868 is a reply to message #1718828] Thu, 31 December 2015 12:29 Go to previous message
Mickey Mouse is currently offline Mickey MouseFriend
Messages: 26
Registered: July 2012
Junior Member
Hi David, thanks for your answer. I linked the projects because I noticed that with this trick intellisense is able to jump in the definition of a utilised function of the referenced project, otherwise it will only show the declaration in the header. Leaving apart any (good) debate that the header/interface is not documented as it should, reading the definition is the only way to understand the behaviour of the function itself. Whereas running make in the referenced projects without necessity may be just time consuming, even if it does not have to re-build anything, because of the size of the projects (in my case they are LLVM/Clang).

My point is, I assume that the external/referenced projects are libraries and are already built, and there is no necessity to execute `make' on them. I am going to try creating a new build configuration for the external projects, where the build command is a nop. Nevertheless I was looking for a cleaner solution.
Previous Topic:No binary files and errors when launched
Next Topic:Lost significant code edits while trying to refactor some class names
Goto Forum:
  


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

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

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

Back to the top