Out of source CMake builds vs lift

I’m trying to lift-build our software using CMake. We require out of source builds: build and source directory need to be different. I didn’t see any doc or prior questions on this.

For a CMake / C++ project I suppose I should nonetheless best use compdb, generated by cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=On? IIUC the resulting compile_commands.json needs to be in the source’s root directory - but it’s a build artifact. Should I move it there? Will this confuse lift because the source file location isn’t correct anymore?

If you recommend to not use compdb but cmake: how do I convince lift to do an out of source build?

I’d appreciate some hints how to do this correctly.