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

Enable the PCH when build C::B against wx3.x

<< < (2/4) > >>

Miguel Gimenez:
Should the changes in r11401 be ported to CodeBlocks_wx31_64.cbp?. Currently, sources compiling OK in 32 bits fail when compiling in 64 bits due to CB_PRECOMP being undefined and NOPCH being defined in the 64 bits project.

AndrewCot:
My investigation on C::B GCC versions are:
1. C::B 20.03 used GCC 8.1.0
2. C::B Nightly also uses GCC 8.1.0
3. The C::B 20.03 bundled GCC is also 8.1.0

My feedback on building is:
1. If you use the windows *.workspace to build C::B then it references other *wx31*.cbp files that also need to be patched as it looks like all (a heck of allot of them) have the "-DNOPCH" option.
2. My build time went from on average 510seconds to 476 seconds after just changing the CodeBlocks_wx31_64.cbp file (I build using the CodeBlocks_wx31_64.workspace).
3. I am using Windows 10 (21H2  19044.1387 , latest and patched as of 3-Dec-2021) and MSYS2 x64 using GCC 11.2.0 and WxWidget 3.1.5 (built with same MSYS2 GCC 11.2.0).


My Conclusion
YES, but the other *wx31*.cbp files also need changing to make them consistent and minimize the build time.
If someone is using an old GCC or has a reason to use an old GCC then they can grab the files from before the change as the official C::B releases and nightly builds use a GCC version that will benefit from this change by reducing the build time.

stahta01:
FYI: Code::Blocks has in the past 3 years not used the PCH correctly in the contrib projects.

Turning off "-DNOPCH" is a waste of time if the devs refuse to add the location of the PCH to the project search path.

Tim S.

AndrewCot:
Tim,
In the m4\acinclude.m4 file there are tests to check for GCC < 3.4 to disable PCH support (approx line 800). Based on the info above should this be changed to GCC < 7 just to be safe?
ThanksAndrew

stahta01:

--- Quote from: stahta01 on December 04, 2021, 09:14:37 am ---FYI: Code::Blocks has in the past 3 years not used the PCH correctly in the contrib projects.

Turning off "-DNOPCH" is a waste of time if the devs refuse to add the location of the PCH to the project search path.

Tim S.

--- End quote ---
My comment was about PCH usage in C::B projects; no idea where the PCH header is stored using configure/make.

Edit2: For a PCH to be useful it must be either in the same directory as the header or be in the include search path before the normal headers. And, the source code must be written correctly to use the PCH headers.

Tim S.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version