+ if(NOT "${VERSION}" MATCHES
+ "^[0-9]+\\.[0-9]+\\.[0-9]+-[0-9a-zA-Z]+\\.?r?[0-9]*\\.?g?[0-9a-zA-Z]*$")
+
+ message(FATAL_ERROR
+ "\nCOULD NOT EXTRACT VALID VERSION STRING FROM git_describe!"
+ "\n git_describe returned: \"${GIT_DESCRIPTION}\""
+ "\n Extracted invalid version string: \"${VERSION}\"\n")
+
+ endif(NOT "${VERSION}" MATCHES
+ "^[0-9]+\\.[0-9]+\\.[0-9]+-[0-9a-zA-Z]+\\.?r?[0-9]*\\.?g?[0-9a-zA-Z]*$")
+
+ set(${_gitversionprefix} "${VERSION}" PARENT_SCOPE)