jeudi 11 juin 2020

Installing unit tests for later execution with ctest

I'm building a program intended for execution on another machine, with the target folders being mounted somehow on that other machine (e.g. with NFS or SMB). Since it depends on hardware that's not available on the build machine, make test will "fail" for lack of that hardware; or perhaps - it's a cross-platform build and the tests won't even run.

Now, I do want to run the unit tests - all of them, using ctest, or make test, on the target machine. But I can only do that if CMake allows me to --install-tests as opposed to --install.

Is there some mechanism for install tests for later execution in CMake?

Note: If it somehow only exists in recent versions, that's fine as an answer.

Related: CMake how to install test files with unit tests

Aucun commentaire:

Enregistrer un commentaire