cmake: add function to add unit test

1 job for master in 18 seconds (queued for 1 second)