cmake: work with CMake < 2.8.5
authorDylan Noblesmith <nobled@dreamwidth.org>
Mon, 12 Dec 2011 13:06:25 +0000 (13:06 +0000)
committerDylan Noblesmith <nobled@dreamwidth.org>
Mon, 12 Dec 2011 13:06:25 +0000 (13:06 +0000)
commitf931261b510b5762b686e4bcfa0e97f1f6a7c8c8
treec2d6f575e9ec6806cc2de82e307f8bfb5e8efa67
parentddbc274169ed4ee0e0ac32ed194b925a180202fe
cmake: work with CMake < 2.8.5

CMake versions 2.8.4 and earlier were giving this error since r146323:
"string end index: -1 is out of range 0 - 6"

Passing -1 as the length of the desired substring was a new feature
added in CMake 2.8.5:
http://www.cmake.org/Bug/view.php?id=10740

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146372 91177308-0d34-0410-b5e6-96231b3b80d8
cmake/modules/VersionFromVCS.cmake