Reintroduce the hard-coded version number in CMakeList.txt, but
still check for a tagged version. If the hard-coded version is
more recent than the latest tag, then use that but with a "-pre"
suffix in place of the patch level.
In either case, still append the revision hash and possibly the
dirty flag to the version, unless git HEAD exactly matches a tag.