fix(cache): harden shared cache configuration

This commit is contained in:
Eduardo Dantas 2026-08-13 13:55:12 -03:00
parent 6eb43b94f7
commit b6bc01462d
4 changed files with 11 additions and 5 deletions

2
.gitignore vendored
View file

@ -333,4 +333,4 @@ android/.gradle/
android/build/
luajit-src/
CMakeUserPresets.json
vc18/.canary-shared-cache/
**/.canary-shared-cache/

View file

@ -18,7 +18,7 @@
},
"CMAKE_COLOR_DIAGNOSTICS": "ON",
"SPEED_UP_BUILD_UNITY": "ON",
"VCPKG_INSTALL_OPTIONS": "--binarysource=clear;--binarysource=files,$env{VCPKG_ROOT}/binary-cache,readwrite;--clean-packages-after-build;--clean-buildtrees-after-build"
"VCPKG_INSTALL_OPTIONS": "--clean-packages-after-build;--clean-buildtrees-after-build"
}
},
{
@ -108,7 +108,9 @@
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"ASAN_ENABLED": "ON",
"TOGGLE_PRE_COMPILED_HEADER": "OFF"
"TOGGLE_PRE_COMPILED_HEADER": "OFF",
"CMAKE_C_COMPILER": null,
"CMAKE_CXX_COMPILER": null
}
},
{

View file

@ -1,3 +1,5 @@
#Requires -Version 7.2
[CmdletBinding(SupportsShouldProcess = $true)]
param(
[Parameter()]
@ -1335,7 +1337,7 @@ $solutionTrees = foreach ($worktreeRoot in $worktreeRoots) {
}
$activePropertyGroups = @(
$solutionProps.Project.PropertyGroup |
$solutionProps.SelectNodes("/*[local-name()='Project']/*[local-name()='PropertyGroup']") |
Where-Object { $_.CanarySharedVcpkgActive -eq "true" }
)
if ($activePropertyGroups.Count -eq 0) {

View file

@ -1,3 +1,5 @@
#Requires -Version 7.2
[CmdletBinding(SupportsShouldProcess = $true)]
param(
[ValidateNotNullOrEmpty()]
@ -552,7 +554,7 @@ if ($AuditOnly) {
throw "Generated Solution cache props are malformed: $OutputProps. Regenerate the file and reload the project. $($_.Exception.Message)"
}
$activePropertyGroups = @(
$existingProps.Project.PropertyGroup |
$existingProps.SelectNodes("/*[local-name()='Project']/*[local-name()='PropertyGroup']") |
Where-Object { $_.CanarySharedVcpkgActive -eq "true" }
)
foreach ($expectedConfiguration in $configurations) {