Improve CMake handling of tests
Right now, the way tests are handled in the CMake build system is just horrible (due to the initial pressure to keep everything as autotools-like as possible). The build system somehow messes with the internal test
target of CMake to recursively call CMake again during make
execution, which causes all kinds of problems, but the two most severe are:
-
Registering a test in CMake is really weird and completely inconsistent between different Dune modules
-
Due to the recursive call trick, parallel builds are broken, causing test builds to take much longer than necessary.
I have built myself a very simple alternative infrastructure in dune-multidomaingrid (cf. https://github.com/smuething/dune-multidomaingrid/blob/master/test/CMakeLists.txt), which I'd like to pull into PDELab in a slightly more polished version and move all of the tests over to that.
Then we just need to get #6 (closed) implemented, and mere mortals will be able to have CMake run their new tests again...