File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,24 @@ if (EXPERIMENTAL_VERSION)
16
16
endif ()
17
17
18
18
if (ENABLE_VCPKG)
19
+ # check if vcpkg is shallow and unshallow it if necessary
20
+ execute_process (
21
+ COMMAND git rev-parse --is-shallow-repository
22
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} /dependencies/vcpkg
23
+ OUTPUT_VARIABLE is_vcpkg_shallow
24
+ OUTPUT_STRIP_TRAILING_WHITESPACE
25
+ )
26
+
27
+ if (is_vcpkg_shallow STREQUAL "true" )
28
+ message (STATUS "vcpkg is shallow. Unshallowing it now..." )
29
+ execute_process (
30
+ COMMAND git fetch --unshallow
31
+ WORKING_DIRECTORY "${CMAKE_SOURCE_DIR} /dependencies/vcpkg"
32
+ RESULT_VARIABLE result
33
+ OUTPUT_VARIABLE output
34
+ )
35
+ endif ()
36
+
19
37
if (UNIX AND NOT APPLE )
20
38
set (VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_LIST_DIR} /dependencies/vcpkg_overlay_ports_linux" )
21
39
elseif (APPLE )
You can’t perform that action at this time.
0 commit comments