File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 11. " $PSScriptRoot /Config.ps1"
22function Get-CompilerArgs {
3- param ([Parameter (Mandatory )]
3+ param (
4+ [Parameter (Mandatory )]
45 [string ]
56 $Configuration ,
67 [Parameter (Mandatory )]
8+ [string ]
9+ $TestDirectory ,
10+ [Parameter (Mandatory )]
711 [ValidateSet (' c' , ' cpp' )]
812 [string ]
913 $Language
1014 )
11- return $COMPILER_ARGS [$Language ][$Configuration ]
15+ $baseArgs = $COMPILER_ARGS [$Language ][$Configuration ]
16+
17+ $optionsFile = (Join-Path $TestDirectory " options.$Configuration " )
18+
19+ # perhaps there is an options file?
20+ if (Test-Path $optionsFile ){
21+ return $baseArgs + " " + (Get-Content $optionsFile )
22+ }
23+
24+ return $baseArgs
1225}
Original file line number Diff line number Diff line change @@ -26,8 +26,7 @@ function New-Database-For-Rule {
2626 Write-Host " Found '.cpp' files $cppFilesString ."
2727
2828 $CompilerExecutable = Get-CompilerExecutable - Configuration $Configuration - Language $Language
29- $CompilerArgs = Get-CompilerArgs - Configuration $Configuration - Language $Language
30-
29+ $CompilerArgs = Get-CompilerArgs - Configuration $Configuration - Language $Language - TestDirectory $RuleTestDir
3130 $BUILD_COMMAND = " $CompilerExecutable $CompilerArgs $cppFilesString "
3231
3332 if ($UseTmpDir ) {
You can’t perform that action at this time.
0 commit comments