Nuke HAVE_PCH and use only one macro for PCH logic.
This macro is enabled (=1) or disabled (=0) based on --without-pch and no_pch parameters in premake5
Visual studio no more overrides this logic
Details
- Reviewers
Itms - Commits
- rP23314: Precompiled logic update [Windows build]
check that game builds with without-pch flag
Windows builds
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
build/premake/premake5.lua | ||
---|---|---|
474 ↗ | (On Diff #6149) | Add back the newline :) |
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/differential/233/display/redirect
Oof this one is old. Many sorries for the awful queue ?
At first sight this adds a confusing option. I would have expected the patch to define CONFIG_ENABLE_PCH to 0 when --without-pch is passed to premake, no?
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/differential/1202/display/redirect
I think this is a good first step, but CONFIG_ENABLE_PCH is kind of a dumb variable. Ideally, either precompiled headers are enabled and the new include the whole content of them, or they aren't and we include nothing.
Right now our precompiled headers also act as global include files, when they probably shouldn't.
Thanks for the patch and I owe you a beer or something for the delay ? The changes look perfect. Let's get them in before the copyright year becomes wrong...
Can you rebase and reupload before committing? That way it will be tested under Windows and macOS ? And I can build without pch on Linux too.
I think our use of the precompiled headers is clever in that sense, we use them for two purposes. I agree it might be confusing and I don't know if this is a good practice, but I like it.
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/11/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/916/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1434/display/redirect