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.

Gentle ping on ideas - I cannot believe we’re the only ones requiring out-of-source builds… I would love to see this work for ROOT, to include sonatype in our C++ toolchain here at CERN!

Hi @axel.naumann! Thank you for reaching out regarding Sonatype Lift. We wanted to let you know we’ve seen your question, but are currently evaluating some changes in direction for this offering. We will have more details to share in the next couple of weeks and will follow back up in this Community category then.