Skip to content

Commit a5d9618

Browse files
committed
try setting debug build type as a cmake arg
1 parent f1d8904 commit a5d9618

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

.github/workflows/cmake_install.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
runs-on: windows-2022
1414
env:
1515
CXX_STANDARD: '17'
16+
VCPKG_BUILD_TYPE: "debug"
1617
steps:
1718
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1819
with:
@@ -31,6 +32,7 @@ jobs:
3132
runs-on: windows-2019
3233
env:
3334
CXX_STANDARD: '14'
35+
VCPKG_BUILD_TYPE: "debug"
3436
steps:
3537
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3638
with:

ci/setup_windows_ci_environment.ps1

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,31 @@ git submodule update -f "tools/vcpkg"
88
Push-Location -Path "tools/vcpkg"
99
$VCPKG_DIR = (Get-Item -Path ".\").FullName
1010

11-
$TripletsDir = Join-Path $VCPKG_DIR "..\triplets"
12-
$TripletOptions = "--overlay-triplets=$TripletsDir --triplet=x64-windows-debug-only"
13-
1411
./bootstrap-vcpkg.bat
1512
./vcpkg integrate install
1613

14+
$buildType = $env:VCPKG_BUILD_TYPE
15+
if ($buildType) {
16+
Write-Host "Using build type: $buildType"
17+
$VCPKG_BUILD_TYPE_ARG = "-DVCPKG_BUILD_TYPE=$buildType"
18+
} else {
19+
Write-Host "No build type provided; using default multi-config build."
20+
$VCPKG_BUILD_TYPE_ARG = ""
21+
}
22+
1723
# Google Benchmark
18-
./vcpkg "--vcpkg-root=$VCPKG_DIR" install benchmark:x64-windows $TripletOptions
24+
./vcpkg "--vcpkg-root=$VCPKG_DIR" install benchmark:x64-windows --x-cmake-args="$VCPKG_BUILD_TYPE_ARG"
1925

2026
# Google Test
21-
./vcpkg "--vcpkg-root=$VCPKG_DIR" install gtest:x64-windows $TripletOptions
27+
./vcpkg "--vcpkg-root=$VCPKG_DIR" install gtest:x64-windows --x-cmake-args="$VCPKG_BUILD_TYPE_ARG"
2228

2329
# nlohmann-json
24-
./vcpkg "--vcpkg-root=$VCPKG_DIR" install nlohmann-json:x64-windows $TripletOptions
30+
./vcpkg "--vcpkg-root=$VCPKG_DIR" install nlohmann-json:x64-windows --x-cmake-args="$VCPKG_BUILD_TYPE_ARG"
2531

2632
# grpc with custom CMake arguments
27-
./vcpkg "--vcpkg-root=$VCPKG_DIR" install grpc:x64-windows $TripletOptions `
28-
--x-cmake-args=" -DgRPC_INSTALL=ON `
33+
./vcpkg "--vcpkg-root=$VCPKG_DIR" install grpc:x64-windows `
34+
--x-cmake-args="$VCPKG_BUILD_TYPE_ARG `
35+
-DgRPC_INSTALL=ON `
2936
-DgRPC_BUILD_TESTS=OFF `
3037
-DgRPC_BUILD_GRPC_CPP_PLUGIN=ON `
3138
-DgRPC_BUILD_GRPC_CSHARP_PLUGIN=OFF `
@@ -37,9 +44,9 @@ $TripletOptions = "--overlay-triplets=$TripletsDir --triplet=x64-windows-debug-o
3744
-DgRPC_BUILD_GRPCPP_OTEL_PLUGIN=OFF"
3845

3946
# curl
40-
./vcpkg "--vcpkg-root=$VCPKG_DIR" install curl:x64-windows $TripletOptions
47+
./vcpkg "--vcpkg-root=$VCPKG_DIR" install curl:x64-windows --x-cmake-args="$VCPKG_BUILD_TYPE_ARG"
4148

4249
# prometheus-cpp
43-
./vcpkg "--vcpkg-root=$VCPKG_DIR" install prometheus-cpp:x64-windows $TripletOptions
50+
./vcpkg "--vcpkg-root=$VCPKG_DIR" install prometheus-cpp:x64-windows --x-cmake-args="$VCPKG_BUILD_TYPE_ARG"
4451

4552
Pop-Location

0 commit comments

Comments
 (0)