read version and subversion info from Git
To get the version, find the last tag in git tag of the form "v2.0.0" or "2.0.0". If this is the last tag and the current commit matches the ref of this tag, the revision will be empty. In the case that the current commit is not tagged with a version, to get the revision, use the short sha unless the current commit is tagged with something that is not a version string, e.g. "feature-foo", in which case the revision will be "feature-foo". If the current commit is tagged as e.g. "v2.0.1-foo" or "2.0.1-foo" then the version will be "2.0.1" and the revision will be "foo". Tags of this form are also checked when finding the current version. This is all done in cmake. If there is no git detected, the version will be "2.0.0" and the revision will be "unknown".