diff --git a/llvm/cmake/modules/VersionFromVCS.cmake b/llvm/cmake/modules/VersionFromVCS.cmake --- a/llvm/cmake/modules/VersionFromVCS.cmake +++ b/llvm/cmake/modules/VersionFromVCS.cmake @@ -4,7 +4,7 @@ # extra argument, otherwise uses CMAKE_CURRENT_SOURCE_DIR). function(get_source_info path revision repository) - find_package(Git) + find_package(Git QUIET) if(GIT_FOUND) execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --git-dir WORKING_DIRECTORY ${path} @@ -45,5 +45,7 @@ set(${repository} ${path} PARENT_SCOPE) endif() endif() + else() + message(WARNING "Git not found. Version cannot be determined.") endif() endfunction()