composable_kernel
composable_kernel copied to clipboard
CMake: Enable cache if available + Prevent in-source builds
- Enable cache if available, either to enable if exist or enable custom compiler mechanism. It also show mistake if cache mechanism is not found.
- The function to prevent in-source builds.
Two things:
- If you use our public containers to build CK, you can already take full advantage of sccache or ccache installed there and use it locally (and we are using it via redis server in CI).
- We frequently use different compiler versions which may have significant differences, so it's important to make sure that the compiler you are using for the build is the same that was used to generate the objects residing in the cache. Otherwise tests may start failing or passing at random and performance may undergo huge inexplicable fluctuations. We use a special wrapper script for that which is located in the /script/ folder. Please make sure to use some similar check.