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

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

<< < (3/4) > >>

killerbot:
already saying this for 15 years, what about kicking out pch completely ?

AndrewCot:
I was asking about GCC version as checking as it looked like GCC < 7 may crash if the PCH is too big and as such I though it may be a good idea to update the GCC version in the check to only enable PCH in GCC >=7.

In the long run wouldn't it be better to get PCH working correctly in order to speed up the C::B build so devs can do more coding than wait for build to complete?


stahta01:

--- Quote from: AndrewCot on February 11, 2022, 11:05:09 pm ---In the long run wouldn't it be better to get PCH working correctly in order to speed up the C::B build so devs can do more coding than wait for build to complete?

--- End quote ---

In the last 3 years I have learned that having code in the source code to support PCH is not worth the effort under Windows.
It is easier and better to have all the PCH stuff in the build system under Windows when using the GCC toolchain. I have no idea if this is also true for Linux or other toolchains.

Tim S.

ollydbg:

--- Quote from: stahta01 on February 12, 2022, 12:04:35 am ---
--- Quote from: AndrewCot on February 11, 2022, 11:05:09 pm ---In the long run wouldn't it be better to get PCH working correctly in order to speed up the C::B build so devs can do more coding than wait for build to complete?

--- End quote ---

In the last 3 years I have leaned that having code in the source code to support PCH is not worth the effort under Windows.
It is easier and better to have all the PCH stuff in the build system under Windows when using the GCC toolchain. I have no idea if this is also true for Linux or other toolchains.

Tim S.

--- End quote ---

Hi, stahta01, "have all the PCH stuff in the build system under Windows when using the GCC toolchain", do you mean that we can specify the pch file from the command line?

like the below option put in the compile command line


--- Code: ----include "sdk_precomp.h"
--- End code ---

?

By using this way, I don't need to tweak the source code (adding #include "sdk_precomp.h" in each cpp file)

Am I correct?

killerbot:
I might professional live we never use pch, have good abstractions and hiding implementation, and things build quick, even big systems.

In al the years of CB Ih ave noticed that those pch lead to incorrect and brittle code, in the sense with pch it builds, but not without pch, because code is being added, without thinking and including the headers needed, but by plain dum luck due to that pch (let's include the world and believe this speeds up things since this part might be pre compiled) it gives the impression it compiles.

The day we remove it from CB sources you all get a nice Belgian beer from me ;-)


Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version