s/CMAKE_TEST_GENERATOR/CMAKE_GENERATOR/g
The code for the tests is basically the same for all those subtests, so have one template and configure that for as many tests as possible to make it easier maintainable.