Fail build if gitversion cannot be found

This commit is contained in:
Sebastian Messmer 2016-04-01 11:39:28 +02:00
parent 4627666788
commit f0d11bb5a7

View File

@ -11,4 +11,7 @@ function (get_git_version OUTPUT_VARIABLE)
IF(NOT ${result} EQUAL 0) IF(NOT ${result} EQUAL 0)
MESSAGE(FATAL_ERROR "Error running versioneer. Return code is: ${result}, error message is: ${error}") MESSAGE(FATAL_ERROR "Error running versioneer. Return code is: ${result}, error message is: ${error}")
ENDIF() ENDIF()
IF("${STRIPPED_VERSION}" EQUAL "0+unknown")
MESSAGE(FATAL_ERROR "Unable to find git version information. Please build directly from a git repository (i.e. after git clone).")
ENDIF()
endfunction(get_git_version) endfunction(get_git_version)