Skip to content

Commit f6150e6

Browse files
dschoGit for Windows Build Agent
authored andcommitted
cmake: support SKIP_DASHED_BUILT_INS
Just like the Makefile-based build learned to skip hard-linking the dashed built-ins in 179227d (Optionally skip linking/copying the built-ins, 2020-09-21), this patch teaches the CMake-based build the same trick. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 87ea580 commit f6150e6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

contrib/buildsystems/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,13 +691,17 @@ endif()
691691

692692
parse_makefile_for_executables(git_builtin_extra "BUILT_INS")
693693

694+
option(SKIP_DASHED_BUILT_INS "Skip hardlinking the dashed versions of the built-ins")
695+
694696
#Creating hardlinks
697+
if(NOT SKIP_DASHED_BUILT_INS)
695698
foreach(s ${git_SOURCES} ${git_builtin_extra})
696699
string(REPLACE "${CMAKE_SOURCE_DIR}/builtin/" "" s ${s})
697700
string(REPLACE ".c" "" s ${s})
698701
file(APPEND ${CMAKE_BINARY_DIR}/CreateLinks.cmake "file(CREATE_LINK git${EXE_EXTENSION} git-${s}${EXE_EXTENSION})\n")
699702
list(APPEND git_links ${CMAKE_BINARY_DIR}/git-${s}${EXE_EXTENSION})
700703
endforeach()
704+
endif()
701705

702706
if(CURL_FOUND)
703707
set(remote_exes

0 commit comments

Comments
 (0)