Skip to content

Commit 4863375

Browse files
dschoGit for Windows Build Agent
authored andcommitted
Merge pull request #3056 from dscho/cmake-and-skip-dashed-built-ins
Teach our CMake configuration to optionally skip hard-linking the dashed built-ins
2 parents d05099b + 95a8e27 commit 4863375

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/git-artifacts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ jobs:
292292
run: |
293293
cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/arm64-windows \
294294
-DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON -DCMAKE_GENERATOR_PLATFORM=arm64 -DVCPKG_ARCH=arm64-windows \
295-
-DCMAKE_INSTALL_PREFIX="`pwd`/git-arm64"
295+
-DCMAKE_INSTALL_PREFIX="`pwd`/git-arm64" -DSKIP_DASHED_BUILT_INS=ON
296296
- name: MSBuild
297297
run: msbuild git.sln -property:Configuration=Release
298298
- name: Link the Git executables

contrib/buildsystems/CMakeLists.txt

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

693693
parse_makefile_for_executables(git_builtin_extra "BUILT_INS")
694694

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

703707
if(CURL_FOUND)
704708
set(remote_exes

0 commit comments

Comments
 (0)