Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Precompiled headers (PCH) support in Code::Blocks

<< < (7/8) > >>

tiwag:
@Yiannis

i just updated some of my private projects to use CB's PCH-support and would like to know,
if there is some proposed way till now, to change the compiling sequence.

* all my projects where i have added PCH support, have the relevant header file precomp.h as last file in the project list

* when i do a Rebuild, all source files get compiled without PCH and at last the header precomp.h get's precompiled to precomp.h.gch :?

* i changed the "Priority Weight" Slider of the precomp.h to 100%, but it didn't change anything

* as last resort i edited the project file and put the precomp.h at the first position of project files,  8)
 but it didn't change anything

? is it somehow possible to create the .gch file BEFORE the source modules are compiled when i use Rebuild Project ?

thanks

Urxae:

--- Quote from: tiwag on October 22, 2005, 10:14:35 am ---3.) i manually compiled the wxsheaders.h to wxsheaders.h.gch
because the wxSmith_2_6.cbp project file has not marked the wxsheaders.h to use it pre-compiled.

--- End quote ---

Why not just mark them as precompiled yourself? (and adjust priorities, see below)


--- Quote ---(nice feature which Yiannis added into one of the very last CB commits, thanks to Yiannis btw. !!)
[...]
really nice !
--- End quote ---
I agree :)


--- Quote from: tiwag on October 22, 2005, 10:45:16 am ---@Yiannis

--- End quote ---

Not me, but I'll answer anyway ;)


--- Quote ---* when i do a Rebuild, all source files get compiled without PCH and at last the header precomp.h get's precompiled to precomp.h.gch :?

* i changed the "Priority Weight" Slider of the precomp.h to 100%, but it didn't change anything

* as last resort i edited the project file and put the precomp.h at the first position of project files,  8)
 but it didn't change anything

? is it somehow possible to create the .gch file BEFORE the source modules are compiled when i use Rebuild Project ?

--- End quote ---

You should set the "Priority Weight" slider to 0% (or anything below the other source files at least). This one had me confused also, but basically it works the other way around than you'd expect :shock:. Lower priority weight means compiled earlier.
If you have multiple precompiled headers, and one uses the other, make sure the used one's priority weight is lower than the using one.

But this is indeed a very cool feature 8). Thanks, Yiannis.

tiwag:

--- Quote from: Urxae on October 22, 2005, 11:05:30 am ---...You should set the "Priority Weight" slider to 0% (or anything below the other source files at least). This one had me confused also, but basically it works the other way around than you'd expect :shock:. Lower priority weight means compiled earlier....
--- End quote ---
thanks Urxae for enlightening me !! it works as you told , even when i never expected it working this way ... ( i have to improve my logic  :? isn't it ?)


--- Quote from: Urxae on October 22, 2005, 11:05:30 am ---But this is indeed a very cool feature 8). Thanks, Yiannis.

--- End quote ---
indeed it is, again, thanks too !

as i know CB is the second IDE which is able to use GCC's PCH features
(the first one was Chinook, from where i looked how it works)

tiwag:

--- Quote from: Urxae on October 22, 2005, 11:05:30 am ---
--- Quote from: tiwag on October 22, 2005, 10:14:35 am ---3.) i manually compiled the wxsheaders.h to wxsheaders.h.gch
because the wxSmith_2_6.cbp project file has not marked the wxsheaders.h to use it pre-compiled.

--- End quote ---
Why not just mark them as precompiled yourself? (and adjust priorities, see below)

--- End quote ---
yes i did it that way, thanks again !

I only wanted to post my comment about, that the project file in CVS could be optimised for that specific feature too  :)

mandrav:

--- Quote from: tiwag on October 22, 2005, 10:45:16 am ---* i changed the "Priority Weight" Slider of the precomp.h to 100%, but it didn't change anything

--- End quote ---

As pointed out by Urxae, priority should be less than the default (50). Possibly 0 to ensure that it's compiled first.
Is it actually displaying the percent (%) sign? Because that would be wrong. Priority is a number ranging from 0 to 100, with lowest number meaning higher priority...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version