For more background and an excellent motivation for using this technique for fixtures see https://crascit.com/2016/10/18/test-fixtures-with-cmake-ctest/.
There is more
Get CMake Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.