If you put something else besides a target name after COMMAND, it will register as a command line to run. It would also be valid to put the generator expression:
If you want to run CMake to build a project as part of a test, you can do that too (in fact, this is how CMake tests itself). For example, if your master project was called `MyProject` and you had an `examples/simple` project that could build by itself, this would look like: