File: 0012-optional-git.patch

package info (click to toggle)
hipblas 6.4.3-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 26,548 kB
  • sloc: cpp: 209,856; f90: 49,800; python: 4,680; ansic: 1,141; sh: 799; makefile: 50; xml: 23
file content (35 lines) | stat: -rw-r--r-- 1,261 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From: Cordell Bloor <cgmb@debian.org>
Date: Tue, 18 Nov 2025 15:04:52 -0700
Subject: optional git

Git is only used to print a message during the build. The message is
not useful when building from a tarball or from the salsa git repo.

Forwarded: no
---
 library/CMakeLists.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
index af98e18..5f600fc 100644
--- a/library/CMakeLists.txt
+++ b/library/CMakeLists.txt
@@ -45,8 +45,9 @@ if( BUILD_VERBOSE )
 endif( )
 
 # Get the git hash of the hipBLAS branch
-find_package(Git REQUIRED)
+find_package(Git)
 
+if(Git_FOUND)
 execute_process(COMMAND "${GIT_EXECUTABLE}" rev-parse HEAD
                 WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
                 OUTPUT_VARIABLE GIT_HASH_HIPBLAS
@@ -56,6 +57,7 @@ set(hipblas_VERSION_COMMIT_ID "${GIT_HASH_HIPBLAS}")
 
 # log build commits
 message( STATUS "*** Building hipBLAS commit: ${hipblas_VERSION_COMMIT_ID}" )
+endif()
 
 # configure a header file to pass the CMake version settings to the source, and package the header files in the output archive
 configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/include/hipblas-version.h.in" "${PROJECT_BINARY_DIR}/include/hipblas/hipblas-version.h" )