Skip to content

Commit 1de0373

Browse files
committed
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 3e47234 commit 1de0373

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
@@ -685,13 +685,17 @@ endif()
685685

686686
parse_makefile_for_executables(git_builtin_extra "BUILT_INS")
687687

688+
option(SKIP_DASHED_BUILT_INS "Skip hardlinking the dashed versions of the built-ins")
689+
688690
#Creating hardlinks
691+
if(NOT SKIP_DASHED_BUILT_INS)
689692
foreach(s ${git_SOURCES} ${git_builtin_extra})
690693
string(REPLACE "${CMAKE_SOURCE_DIR}/builtin/" "" s ${s})
691694
string(REPLACE ".c" "" s ${s})
692695
file(APPEND ${CMAKE_BINARY_DIR}/CreateLinks.cmake "file(CREATE_LINK git${EXE_EXTENSION} git-${s}${EXE_EXTENSION})\n")
693696
list(APPEND git_links ${CMAKE_BINARY_DIR}/git-${s}${EXE_EXTENSION})
694697
endforeach()
698+
endif()
695699

696700
if(CURL_FOUND)
697701
set(remote_exes

0 commit comments

Comments
 (0)