You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scripts/build-info.cmake
+18-33Lines changed: 18 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -8,16 +8,12 @@ set(BUILD_TARGET "unknown")
8
8
# Look for git
9
9
find_package(Git)
10
10
if(NOTGit_FOUND)
11
-
execute_process(
12
-
COMMANDwhichgit
13
-
OUTPUT_VARIABLEGIT_EXECUTABLE
14
-
OUTPUT_STRIP_TRAILING_WHITESPACE
15
-
)
16
-
if(NOTGIT_EXECUTABLESTREQUAL"")
11
+
find_program(GIT_EXECUTABLENAMESgitgit.exe)
12
+
if(GIT_EXECUTABLE)
17
13
set(Git_FOUNDTRUE)
18
-
message(STATUS"Found Git using 'which': ${GIT_EXECUTABLE}")
14
+
message(STATUS"Found Git: ${GIT_EXECUTABLE}")
19
15
else()
20
-
message(WARNING"Git not found using 'find_package' or 'which'. Build info will not be accurate. Consider installing Git or ensuring it is in the PATH.")
16
+
message(WARNING"Git not found. Build info will not be accurate.")
0 commit comments