Simplify build system for unit tests
There are three "external" dependencies for most of unit tests in master: Google Test, Google Mock, and libxml2. When I initially started writing them, I tried to make the build system such that it would simply not build tests that depend on a component if one of them is not found. Mainly to avoid situations where people would complain that they can't build stuff because they lack one of the above.
But now, Google Test and Google Mock are bundled in the source tree (including them in our build system is the only officially supported way of using them, and this was the simplest approach). Is there any reason to keep complexity in the build system to allow building only, e.g., tests that don't depend on Google Mock?
Another source of complexity is libxml2. I think it has been on the wiki for several years now that libxml2 is planned to be a mandatory dependence, so could we also assume this in the tests?
Basically, removing options to disable only some tests based on what external components are found would simplify the logic in CMakeFiles.txt significantly (and also the contents of src/testutils/ to a lesser extent). And as it is now, the logic disables a lot of unnecessary tests, but I don't see sufficient advantage in trying to improve it further, so is it worth trying to maintain something that "kind of" works?
Simplify build system for unit tests.
- Now that gtest and gmock are build from bundled sources, there should
be no reason to allow disabling just gmock from the tests (at least
not strong enough reason compared to the complexity it brings to
writing the tests and maintaining the build system).
- Make libxml2 mandatory for building any unit tests. Again,
simplifies the build system significantly. Even before this change,
very few of the unit tests were built without libxml2.