Skip to content

Commit 431f1c5

Browse files
kuvausGreen-Sky
authored andcommitted
Require .git/ to be a folder for build-info.h
If llama.cpp is added as a project submodule, .git is a text file containing gitdir. Adding extra backslash .git/ to if(EXISTS) makes it sure that .git/ is a folder containing index.
1 parent 67c7779 commit 431f1c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ file(WRITE "${CMAKE_BINARY_DIR}/BUILD_INFO.h.in" "\
9090
# Generate initial build-info.h
9191
include(${CMAKE_CURRENT_SOURCE_DIR}/scripts/build-info.cmake)
9292

93-
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
93+
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git/")
9494
# Add a custom target for build-info.h
9595
add_custom_target(BUILD_INFO ALL DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/build-info.h")
9696

0 commit comments

Comments
 (0)