Thanks for this effort, I might changing my build instructions for Windows to use this method as the current method requires the user to download CodeLite and make some preparations (I also assume that NOT many people are building CodeLite for Windows)
Maybe this will change things up.
One question:
On Windows, we build using PCH, this boosts the build process significantly, does your change also add PCH?
It does not use PCH; I did not use PCH on purpose while building the MSys2 Package and I did nothing to add it.
I will see if something simple is needed to use PCH; Note using PCH with MinGW GCC is harder that using PCH with GCC under Linux so it is likely broken.
Edit1: I just tried adding "-DWITH_PCH=1" and it fails to build within a few seconds.
Edit3: Turns out my build directions end up in codelite/codelite folder which makes next build fail.
Edit2: False alarm I am now building with PCH; we see if it works.
Edit4: It is saying PCH is invalid. It will likely be a lot of work to fix this.
Building CXX object sdk/wxshapeframework/CMakeFiles/wxshapeframework.dir/src/RoundRectShape.cpp.obj
codelite/PCH/precompiled_header_release.h.gch: not used because `YY_NEVER_INTERACTIVE' is defined [-Winvalid-pch]
I will look at the CodeLite IDE PCH building in hopes that it can be easy to add its method to CMake.
All I remember is it uses more than one PCH file.
Okay, at first glance the CodeLite IDE does not really use PCH to build under Windows.
So, I am going to have to decide if that is true and fix it before trying to add PCH to windows cmake building.
Edit: Or decide to add PCH to windows cmake building before trying to fix PCH building using CodeLite IDE.
Okay, at first glance the CodeLite IDE does not really use PCH to build under Windows.
Hmm, it does
there are 3 projects that are not using PCH, the rest do.
There are 4 PCH files in CodeLite:
One for libcodelite
One for building libplugin + all the plugins
One for building CodeLite IDE itself
One for building wxCrafter
The reason for 3 PCH files is the difference of macros required by each type
Thanks, I will look at "libcodelite" and see if/how it works. Edit: Might try wxCrafter instead.
I did find a few more PCH gch files after the CodeLite IDE was running much longer.
I was mislead by the seeing that only one PCH was built by I think the PCH project; maybe the others are built later by this project or more likely by other projects.
I understand the Code::Blocks project build system; but, the CodeLite project build system is very much a mystery to me.
By trial and error figured out how to have cmake create "libcodelite_pch.h.gch"; so, while my slow computer is building I need to decide if I wish to finish my prior patch or continue on the PCH patches.
I am leaning towards doing the next to last patch needed by the MSys2 mingw codelite package and then re-start work on these PCH patches.
The last MSys2 mingw package patch is one I do not understand well enough to submit as an PR and plan to leave as an patch applied by the msys2 codelite package.
Edit: The PCH changes the same cmake file.
I am working on the mingw cmake PCH changes; but, not certain if I should do an PR till after the above PR is applied.