Make gmock an optional dependency. Tests are built if gmock is found.
This way the CI will build and run tests with the default configuration. Thanks to Andreas Sturmlechner for the suggestion.