@@ -80,14 +80,8 @@ If set, skips building the msi's and installer
80
80
If set, debug information will be generated for the builds.
81
81
82
82
. PARAMETER EnableCaching
83
- If true, use `sccache` to cache the build rules.
84
-
85
- . PARAMETER Cache
86
- The path to a directory where the `sccache` stores the cache. By default, it will point to `$BinaryCache\sccache`.
87
-
88
- . PARAMETER EnableRemoteCaching
89
- If true, use `sccache` to cache the build rules remotely. If set, ensure that you configure the appropriate
90
- remote caching backend location and credentials environment variables for sccache.
83
+ If true, use `sccache` to cache the build rules. Configuration of sccache must be done through
84
+ the environment variables defined by the sccache project.
91
85
92
86
. PARAMETER Clean
93
87
If true, clean non-compiler builds while building.
@@ -171,14 +165,9 @@ param
171
165
[string ] $Variant = " Asserts" ,
172
166
[switch ] $Clean ,
173
167
[switch ] $DebugInfo ,
174
- [parameter (ParameterSetName = " LocalCaching" )]
175
168
[switch ] $EnableCaching ,
176
- [parameter (ParameterSetName = " RemoteCaching" )]
177
- [switch ] $EnableRemoteCaching ,
178
169
[ValidateSet (" debug" , " release" )]
179
170
[string ] $FoundationTestConfiguration = " debug" ,
180
- [parameter (ParameterSetName = " LocalCaching" )]
181
- [string ] $Cache = " " ,
182
171
[switch ] $Summary ,
183
172
[switch ] $ToBatch
184
173
)
@@ -1211,11 +1200,6 @@ function Build-CMakeProject {
1211
1200
Invoke-VsDevShell $Platform
1212
1201
}
1213
1202
1214
- if ($EnableCaching ) {
1215
- $env: SCCACHE_DIRECT = " true"
1216
- $env: SCCACHE_DIR = " $ ( if ($Cache ) { $Cache } else { " $BinaryCache \sccache" }) "
1217
- }
1218
-
1219
1203
# Add additional defines (unless already present)
1220
1204
$Defines = $Defines.Clone ()
1221
1205
@@ -1298,14 +1282,14 @@ function Build-CMakeProject {
1298
1282
1299
1283
if ($UseMSVCCompilers.Contains (" C" )) {
1300
1284
Add-KeyValueIfNew $Defines CMAKE_C_COMPILER cl
1301
- if ($EnableCaching -or $EnableRemoteCaching ) {
1285
+ if ($EnableCaching ) {
1302
1286
Add-KeyValueIfNew $Defines CMAKE_C_COMPILER_LAUNCHER sccache
1303
1287
}
1304
1288
Add-FlagsDefine $Defines CMAKE_C_FLAGS $CFlags
1305
1289
}
1306
1290
if ($UseMSVCCompilers.Contains (" CXX" )) {
1307
1291
Add-KeyValueIfNew $Defines CMAKE_CXX_COMPILER cl
1308
- if ($EnableCaching -or $EnableRemoteCaching ) {
1292
+ if ($EnableCaching ) {
1309
1293
Add-KeyValueIfNew $Defines CMAKE_CXX_COMPILER_LAUNCHER sccache
1310
1294
}
1311
1295
Add-FlagsDefine $Defines CMAKE_CXX_FLAGS $CXXFlags
@@ -3163,7 +3147,7 @@ if ($Clean) {
3163
3147
}
3164
3148
3165
3149
if (-not $SkipBuild ) {
3166
- if ($EnableCaching -or $EnableRemoteCaching ) - And (-Not (Test-SCCacheAtLeast - Major 0 - Minor 7 - Patch 4 ))) {
3150
+ if ($EnableCaching -And (-Not (Test-SCCacheAtLeast - Major 0 - Minor 7 - Patch 4 ))) {
3167
3151
throw " Minimum required sccache version is 0.7.4"
3168
3152
}
3169
3153
0 commit comments