diff --git a/cmake/GetPastisGitRevision.cmake b/cmake/GetPastisGitRevision.cmake index 39396dca1f1d30b99b2acc43826b75d0649d2c38..fa4bcf61a9410d0922a1d645f0eccf0a5e8a4b59 100644 --- a/cmake/GetPastisGitRevision.cmake +++ b/cmake/GetPastisGitRevision.cmake @@ -1,8 +1,5 @@ # --------------- get git revision info --------------- -list(APPEND CMAKE_MODULE_PATH "${PASTIS_SOURCE_DIR}/cmake/cmake-modules") -include(GetGitRevisionDescription) - set(HAS_PASTIS_GIT_INFO "TRUE") find_package(Git QUIET) @@ -50,10 +47,17 @@ endif() string(FIND "${PASTIS_GIT_TAG}" "${CMAKE_PASTIS_VERSION}" FOUND_VERSION_SUBSTR) -if("${FOUND_VERSION_SUBSTR}" STREQUAL "-1") +if(FOUND_PASTIS_GIT_INFO EQUAL 0) + if("${FOUND_VERSION_SUBSTR}" STREQUAL "-1") + message("") + message ("###### CMake code version ${CMAKE_PASTIS_VERSION} and") + message ("###### git revision info ${PASTIS_GIT_TAG} do not match!") + message("") + endif() +else() message("") - message ("###### CMake code version ${CMAKE_PASTIS_VERSION} and") - message ("###### git revision info ${PASTIS_GIT_TAG} do not match!") + message ("###### This source tree is not a git repository!") + message ("###### If you intend to change sources consider to clone a git repository!") message("") endif()