mirror of
https://github.com/github/awesome-copilot.git
synced 2026-08-01 23:12:29 +00:00
Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -77,10 +77,10 @@ cmake -B build -DCMAKE_TOOLCHAIN_FILE=<vcpkg-root>/scripts/buildsystems/vcpkg.cm
|
|||||||
|
|
||||||
### Adding vcpkg to an Existing Visual Studio Solution
|
### Adding vcpkg to an Existing Visual Studio Solution
|
||||||
|
|
||||||
1. Run `vcpkg integrate install` (one-time, user-wide)
|
1. Create `vcpkg.json` in the solution directory
|
||||||
2. Create `vcpkg.json` in the solution directory
|
2. Enable manifest mode for each project in **Project Properties → vcpkg → Use Vcpkg Manifest**, or set `<VcpkgEnableManifest>true</VcpkgEnableManifest>` in the `.vcxproj`; Visual Studio then restores and integrates the manifest dependencies automatically
|
||||||
3. In VS, the integration is automatic via MSBuild props — no project file edits needed
|
3. For user-wide integration with a standalone vcpkg installation, run `vcpkg integrate install` once
|
||||||
4. Or per-project: add to `.vcxproj`:
|
4. Or for per-project integration, add to `.vcxproj`:
|
||||||
- In the project file's top-level `PropertyGroup`, define `VcpkgRoot`:
|
- In the project file's top-level `PropertyGroup`, define `VcpkgRoot`:
|
||||||
```xml
|
```xml
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
@@ -172,6 +172,7 @@ Place test-only dependencies under an opt-in feature. The `"host"` field is rese
|
|||||||
"dependencies": ["fmt"],
|
"dependencies": ["fmt"],
|
||||||
"features": {
|
"features": {
|
||||||
"tests": {
|
"tests": {
|
||||||
|
"description": "Build project tests",
|
||||||
"dependencies": ["gtest"]
|
"dependencies": ["gtest"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -247,7 +248,7 @@ Available Android triplets: `arm-neon-android`, `arm64-android`, `x86-android`,
|
|||||||
|
|
||||||
3. In CMake, use the vcpkg toolchain and set the triplet:
|
3. In CMake, use the vcpkg toolchain and set the triplet:
|
||||||
```console
|
```console
|
||||||
cmake -B build -DCMAKE_TOOLCHAIN_FILE=<vcpkg-root>/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=arm64-android
|
cmake -B build -DCMAKE_TOOLCHAIN_FILE=<vcpkg-root>/scripts/buildsystems/vcpkg.cmake -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=<android-ndk>/build/cmake/android.toolchain.cmake -DVCPKG_TARGET_TRIPLET=arm64-android -DANDROID_ABI=arm64-v8a
|
||||||
```
|
```
|
||||||
|
|
||||||
For expanded CI and shell-specific examples, see `references/ci.md`.
|
For expanded CI and shell-specific examples, see `references/ci.md`.
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ Each installed port writes:
|
|||||||
- CMake integration (default): `${CMAKE_BINARY_DIR}/vcpkg_installed` (or `VCPKG_INSTALLED_DIR` if overridden)
|
- CMake integration (default): `${CMAKE_BINARY_DIR}/vcpkg_installed` (or `VCPKG_INSTALLED_DIR` if overridden)
|
||||||
- MSBuild integration (default): `$(VcpkgManifestRoot)\vcpkg_installed` (or `$(VcpkgInstalledDir)` if overridden)
|
- MSBuild integration (default): `$(VcpkgManifestRoot)\vcpkg_installed` (or `$(VcpkgInstalledDir)` if overridden)
|
||||||
|
|
||||||
If you need a single consolidated SBOM, enumerate installed ports (for example with `vcpkg x-package-info --x-installed`) and merge/transform the per-port SPDX files in your SBOM pipeline.
|
If you need a single consolidated SBOM, enumerate installed ports with `vcpkg list` and merge/transform their per-port SPDX files in your SBOM pipeline.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -90,9 +90,8 @@ Option 2: **Script-based** — create a scheduled CI job that:
|
|||||||
|
|
||||||
## Multi-Triplet CI Testing
|
## Multi-Triplet CI Testing
|
||||||
|
|
||||||
Test across multiple triplets in a CI matrix:
|
Test across multiple triplets with this job-definition fragment nested under `jobs.<job-id>` in a GitHub Actions workflow:
|
||||||
```yaml
|
```yaml
|
||||||
# GitHub Actions example
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
|||||||
Reference in New Issue
Block a user