I have discovered the problem, and it has nothing to do with CTest or CMake. It had everything to do with our overly-complex build system... but I now understand more about CTest/Dart etc than I did, so thanks for your time!