Skip to content

Commit 756831b

Browse files
committed
compiler specific options
1 parent 59de841 commit 756831b

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed
Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
11
. "$PSScriptRoot/Config.ps1"
22
function 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
}

scripts/matrix_testing/NewDatabaseForRule.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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) {

0 commit comments

Comments
 (0)