diff --git a/src/gitversion/gitversion.cmake b/src/gitversion/gitversion.cmake index a1bc954c..4354f80e 100644 --- a/src/gitversion/gitversion.cmake +++ b/src/gitversion/gitversion.cmake @@ -11,4 +11,7 @@ function (get_git_version OUTPUT_VARIABLE) IF(NOT ${result} EQUAL 0) MESSAGE(FATAL_ERROR "Error running versioneer. Return code is: ${result}, error message is: ${error}") 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)