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 1
1
. " $PSScriptRoot /Config.ps1"
2
2
function Get-CompilerArgs {
3
- param ([Parameter (Mandatory )]
3
+ param (
4
+ [Parameter (Mandatory )]
4
5
[string ]
5
6
$Configuration ,
6
7
[Parameter (Mandatory )]
8
+ [string ]
9
+ $TestDirectory ,
10
+ [Parameter (Mandatory )]
7
11
[ValidateSet (' c' , ' cpp' )]
8
12
[string ]
9
13
$Language
10
14
)
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
12
25
}
Original file line number Diff line number Diff line change @@ -26,8 +26,7 @@ function New-Database-For-Rule {
26
26
Write-Host " Found '.cpp' files $cppFilesString ."
27
27
28
28
$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
31
30
$BUILD_COMMAND = " $CompilerExecutable $CompilerArgs $cppFilesString "
32
31
33
32
if ($UseTmpDir ) {
You can’t perform that action at this time.
0 commit comments