Enable sccache for debug builds of CMake in gitlab CI
I noticed that CMake's gitlab CI does not use sccache for RelWithDebInfo and Debug builds of CMake on Windows https://gitlab.kitware.com/cmake/cmake/-/blob/v3.21.1/.gitlab/os-windows.yml#L30
It's possible to enable sccache on those configs if you replace the /Zi
flag with /Z7
.
It has the downside of keeping the debug info in the object files, but for CI purposes it should be ok.
Thought i'd mention if you think it's worthwhile to enable it.
We do that in Qt's CI with our own custom function that replaces the /Zi
flag in CMAKE_C/CXX_COMPILER
in the top-
level directory scope.
Edited by Brad King