Hi!
Has someone a setup for ccache and codeblocks on windows? I wonder how it can be set up, or if there are some changes needed...
Buy better computer, it is less hassle than using ccache :)
With this patch it would be possible to use ccache on windows...
It basically splits the compiler command in before first space and after first space. The first part is used as the compiler, the second part is used as argument...
This would break compilation with spaces in the file name, do they exist?
A possibility would be to use a second field for "additional arguemnts" or using "" to mark the executable...
It is just an idea...
Quote from: oBFusCATed on April 21, 2020, 07:34:14 PM
Buy better computer, it is less hassle than using ccache :)
This is sadly not an alternative at the moment....
Generally on linux this is done by wrapping gcc/g++ in script files which execute the compiler. Have you tried this? Why doesn't it work?
I don't understand how this patch works. You'll have to provide an example what is the value before space and after space?
Have you tried it? Because ccache is funky busyness. Most of the savings in compile time are wasted debugging why it has decided that something doesn't need to be rebuilt and when it should have.
I guess the next step for you'll be to get on the unity build train...
These are non-solutions (same as pch), but backwards compatibility is king, we cannot break it...
The target command line is
ccache gcc $other parameters$So i enter
ccache.exe gccin the toolchain executable name
The problem is that codeblocks checks if the compiler is existent with wxFileExists($ENTRY_IN_TOOLCHAINEXECUTABLE$) where i put
ccache.exe gcc so this test fails, but the compilation would work
With my patch the check is only performed on the part before the first ' '
ccache.exeNow this check works and all compiles fine. Codeblocks compiles without problems. I used it on linux quite a lot....
[edit:]
QuoteHave you tried this? Why doesn't it work?
No... this makes things more obscure... I would to prefer not..
I've used ccache in the past and it was a disaster. Then I've stopped using it.
Please don't apply this patch... it doesn't make sense.
Quote from: BlueHazzard on April 22, 2020, 09:40:15 PM
No... this makes things more obscure... I would to prefer not..
Why? What is obscure by naming your executables ccache-gcc.bat and ccache-g++.bat ? It is pretty clear what is going on.
Also how does ccache interact with pch? If you edit some sdk header you'll have to rebuild everything anyway, so you won't win anything in compile time.
It seems the interaction is bad https://ccache.dev/manual/3.7.9.html#_precompiled_headers by the looks of it C::B's build would either fail or fallback to a compiler, because we don't do any of these things.
Quote from: oBFusCATed on April 22, 2020, 07:19:06 PM
Generally on linux this is done by wrapping gcc/g++ in script files which execute the compiler. Have you tried this? Why doesn't it work?
I don't understand how this patch works. You'll have to provide an example what is the value before space and after space?
Have you tried it? Because ccache is funky busyness. Most of the savings in compile time are wasted debugging why it has decided that something doesn't need to be rebuilt and when it should have.
I guess the next step for you'll be to get on the unity build train...
These are non-solutions (same as pch), but backwards compatibility is king, we cannot break it...
Thank you so much for your guide oBFusCATed...
Regards
Shey