reframe icon indicating copy to clipboard operation
reframe copied to clipboard

[feat] Adding support for CMake + Ninja

Open OliverPerks opened this issue 1 year ago • 4 comments

Previously the CMake config would just run 'make'. This commit runs 'cmake --build .' which enables you to specify different build systems within cmake. Specifically this is useful for Ninja, using the 'cmake -GNinja' flag. If no build system is set it will fall back to make.

OliverPerks avatar Jan 30 '24 13:01 OliverPerks

Can I test this patch?

jenkins-cscs avatar Jan 30 '24 13:01 jenkins-cscs

I think the unit tests should be updated (I expect them to fail). Another question: does this change require a specific/recent version of CMake that would otherwise make reframe's backend break for users with older version? We could add a build system variable to control whether to emit make or cmake --build in this case.

vkarak avatar Jan 30 '24 23:01 vkarak

This needs a little bit more thought. In particular, since we now assume that the build system is Make, all the options are passed to make verbatim. So if you pass the 'install' as an option the command will be make install. With the above syntax it would have to be changed to cmake --build . -t install -j <n> or cmake --build . -j -- install.

teojgo avatar Apr 11 '24 08:04 teojgo