Triggering re-build when header changes
-
- CodeLite Enthusiast
- Posts: 46
- Joined: Sat Jan 19, 2013 10:31 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Triggering re-build when header changes
Currently, if I only modify a header file, CodeLite doesn't recompile the source files that have included that header, as only the source files seem to be tracked. Is CodeLite able to figure out which source files have included the modified header and trigger a build of those source files?
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Triggering re-build when header changes
Yes it does. However, it uses gcc to determine which files needs to be recompiled (its done via the Makefile)
Which compiler do you use?
Eran
Which compiler do you use?
Eran
Make sure you have read the HOW TO POST thread
- Jarod42
- CodeLite Expert
- Posts: 240
- Joined: Wed Sep 30, 2009 5:54 pm
- Genuine User: Yes
- IDE Question: C++
- Location: France
- Contact:
Re: Triggering re-build when header changes
Note that dependencies may not be up to date in some situations, as mentioned in
dependencies (.o.d) are not updated correctly (patch)
and in ticket http://sourceforge.net/p/codelite/bugs/751/.
dependencies (.o.d) are not updated correctly (patch)
and in ticket http://sourceforge.net/p/codelite/bugs/751/.
-
- CodeLite Enthusiast
- Posts: 46
- Joined: Sat Jan 19, 2013 10:31 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Triggering re-build when header changes
I'm using Sourcery Codebench Lite (GCC 4.7.3 arm-none-eabi). Could you kindly describe the mechanism by which this process works so I can investigate? I'm using the -MD option in my compiler flags.
-
- CodeLite Expert
- Posts: 167
- Joined: Fri Jul 22, 2011 5:32 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Triggering re-build when header changes
I had that problem quite awhile ago. I've totally forgotten what the issue exactly was but I have a lingering suspicion that it has to do with using the correct version of make.
-
- CodeLite Enthusiast
- Posts: 46
- Joined: Sat Jan 19, 2013 10:31 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Triggering re-build when header changes
I think I may be on to something. My project makefiles look like this:
Shouldn't the DependSuffix have a ".d"? How do I specify this in CodeLite's settings?
Code: Select all
ObjectSuffix :=.o
DependSuffix :=
PreprocessSuffix :=.i
-
- CodeLite Enthusiast
- Posts: 46
- Joined: Sat Jan 19, 2013 10:31 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Triggering re-build when header changes
Found it: Settings --> Build Settings... --> Compilers --> Compiler --> Advanced --> Depends extension
Setting that to ".o.d" and checking the "Use compiler -MT switch to generate source dependencies files (*.o.d)" fixed it for me.
What a relief. Having to rebuild after each minor change is major productivity killer.
Setting that to ".o.d" and checking the "Use compiler -MT switch to generate source dependencies files (*.o.d)" fixed it for me.
What a relief. Having to rebuild after each minor change is major productivity killer.