Open SunBlack opened 3 years ago
Just stumbled upon this (3 years later, hehe). @SunBlack did you end up finding a workaround?
Yes, by using ccache
instead of sccache
, because unfortunately here is no progress. Since ccache
has been able to cache MSVC builds since version 4.6 (MSVC 2017 does not work for us, but 2019 and 2022 do if you have not activated static code analysis) and ccache
can also be configured with a Redis backend, for example, I currently see no reason why you should use sccache if you only use C/C++.<
Gotcha, thank you. That's unfortunate. ccache
has been working excellently for us thus far (except for PCH), so we'll just stick with it and ditch sccache
.
Thank you again for the quick answer!
The readme recommend to use
CMAKE_<LANG>_COMPILER_LAUNCHER
to use sccache. But this command is only processed in case you are using Makefile or Ninja.For MSVC there is another way, which worked with
clcache
(which is not maintained anymore):When using sccache we could use:
But this lead to an invalid call:
Correct would be
To bypass this I tried
/p:CLToolExe="sccache.exe cl.exe"
, but this leads to:So it seems there is currently no way to use this way, But I think this could be easily fixed when sccache automatically detects the compiler from the path.