Skip to content

Commit

Permalink
perf: simplify vcpkg_configure (#22)
Browse files Browse the repository at this point in the history
Signed-off-by: l.feng <[email protected]>
  • Loading branch information
msclock authored Dec 25, 2024
1 parent a303d32 commit 806f38c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions template/cmake/vcpkg/bootstrap/vcpkg_bootstrap.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ function(_vcpkg_bootstrap)
"${arg_UNPARSED_ARGUMENTS}")
endif()

if(NOT DEFINED arg_REPO)
set(arg_REPO https://github.com/microsoft/vcpkg.git)
endif()

find_package(Git QUIET REQUIRED)

if(DEFINED CACHE{_VCPKG_ROOT})
Expand Down
3 changes: 1 addition & 2 deletions template/cmake/vcpkg/vcpkg.toolchain.cmake.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,4 @@ set(VCPKG_VERBOSE

file(READ ${CMAKE_SOURCE_DIR}/vcpkg.json _vcpkg_json)
string(JSON _builtin_baseline GET ${_vcpkg_json} builtin-baseline)
vcpkg_configure(CACHE_DIR_NAME {{ ss_cmake_repo_name}} REPO
https://github.com/microsoft/vcpkg.git REF ${_builtin_baseline})
vcpkg_configure(CACHE_DIR_NAME {{ ss_cmake_repo_name}} REF ${_builtin_baseline})

0 comments on commit 806f38c

Please sign in to comment.