composable_kernel icon indicating copy to clipboard operation
composable_kernel copied to clipboard

CMake: Enable cache if available + Prevent in-source builds

Open mozga-amd opened this issue 1 year ago • 1 comments

  1. Enable cache if available, either to enable if exist or enable custom compiler mechanism. It also show mistake if cache mechanism is not found.
  2. The function to prevent in-source builds.

mozga-amd avatar Sep 12 '24 15:09 mozga-amd

Two things:

  1. 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).
  2. 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.

illsilin avatar Sep 13 '24 00:09 illsilin