Skip to content

Commit 684f551

Browse files
committed
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 38c5d61 + 6121889 commit 684f551

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

705705
parse_makefile_for_executables(git_builtin_extra "BUILT_INS")
706706

707+
option(SKIP_DASHED_BUILT_INS "Skip hardlinking the dashed versions of the built-ins")
708+
707709
#Creating hardlinks
710+
if(NOT SKIP_DASHED_BUILT_INS)
708711
foreach(s ${git_SOURCES} ${git_builtin_extra})
709712
string(REPLACE "${CMAKE_SOURCE_DIR}/builtin/" "" s ${s})
710713
string(REPLACE ".c" "" s ${s})
711714
file(APPEND ${CMAKE_BINARY_DIR}/CreateLinks.cmake "file(CREATE_LINK git${EXE_EXTENSION} git-${s}${EXE_EXTENSION})\n")
712715
list(APPEND git_links ${CMAKE_BINARY_DIR}/git-${s}${EXE_EXTENSION})
713716
endforeach()
717+
endif()
714718

715719
if(CURL_FOUND)
716720
set(remote_exes

0 commit comments

Comments
 (0)