Page 1 of 1

precompiled headers

Posted: Mon Oct 20, 2008 12:37 pm
by Dahman
Hi,
How about using precompiled headers with codelite?
Thanks

Dahman

Re: precompiled headers

Posted: Mon Oct 20, 2008 12:57 pm
by eranif
Hi,

Since I dont use precompiled headers (causes sometimes weird bugs ...), I never took the time to implement this functionality within CodeLite.

If you can describe here, how would u like to see it, I might (and probably will...) do it ;)

Eran

Re: precompiled headers

Posted: Mon Oct 20, 2008 1:29 pm
by Dahman
Thanks for the fast replay.

Well, I think that an easy way is the ability to tell CodeLite that some header file has to be compiled before all the other files on the same project.
That is: I open a menu on the header file - I check some flag (this is a precompiled header or whatever) and CodeLite and the compiler do the rest, compiling the header file and creating the .pch file.
I don't need anything else :)

Thanks

Dahman

Re: precompiled headers

Posted: Mon Oct 20, 2008 2:35 pm
by eranif
Until I will implement this officially, you can do this:

1. right click on the project and select 'settings'
2. select the last tab 'Custom Makefile Step'
3. There are 2 text fields there, in the first one entr the name of the gch file you want to create, for example:

Code: Select all

my_precompile_header.h.gch
NOTE: All paths are relative to the project path, by project path, I mean the location of the relevant .project

and in the dependencies text field, enter this (<TAB> should be replaced with actual TAB character:

Code: Select all

my_precompile_header.h.gch: my_precompile_header.h
<TAB>$(CompilerName) my_precompile_header.h $(CmpOptions) $(IncludePath)
Close the settings dialog, and build your project, you can see that CodeLite created a gch file from the header file

Eran

Re: precompiled headers

Posted: Mon Oct 20, 2008 3:23 pm
by Dahman
Nice. For now it's good enough for me.
By the way, very nice IDE.

Thanks
Dahman