diff options
author | tgingold <tgingold@users.noreply.github.com> | 2016-06-24 17:17:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-24 17:17:21 +0200 |
commit | dc8680d3b002df5dbc2c92e86b133803a9e68a39 (patch) | |
tree | 4db86c374375d3a9b1274b895367d9233b62c04b /libraries/vendors | |
parent | 10aa0ce818defb49f9602ec2c1f09af436830065 (diff) | |
parent | debc7725817a175aa2bad8ac6c1c07dc8fb2bc45 (diff) | |
download | ghdl-dc8680d3b002df5dbc2c92e86b133803a9e68a39.tar.gz ghdl-dc8680d3b002df5dbc2c92e86b133803a9e68a39.tar.bz2 ghdl-dc8680d3b002df5dbc2c92e86b133803a9e68a39.zip |
Merge pull request #96 from Paebbels/paebbels/compile-libraries
Reworked standard libraries compile flow
Diffstat (limited to 'libraries/vendors')
-rw-r--r-- | libraries/vendors/shared.psm1 | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/libraries/vendors/shared.psm1 b/libraries/vendors/shared.psm1 index 912f86be4..52dd206da 100644 --- a/libraries/vendors/shared.psm1 +++ b/libraries/vendors/shared.psm1 @@ -400,9 +400,10 @@ function Write-ColoredGHDLLine .PARAMETER InputObject A object stream is required as an input. - .PARAMETER SuppressWarnings Skip warning messages. (Show errors only.) + .PARAMETER Indent + Indentation string. #> [CmdletBinding()] param( @@ -410,27 +411,29 @@ function Write-ColoredGHDLLine $InputObject, [Parameter(Position=1)] - [switch]$SuppressWarnings = $false + [switch]$SuppressWarnings = $false, + [Parameter(Position=2)] + [string]$Indent = "" ) begin { $ErrorRecordFound = $false } process - { if (-not $InputObject) - { Write-Host "Empty pipeline!" } - elseif ($InputObject -is [String]) - { if ($InputObject.Contains("warning")) + { if ($InputObject -is [String]) + { if ($InputObject -match ":\d+:\d+:warning:\s") { if (-not $SuppressWarnings) - { Write-Host "WARNING: " -NoNewline -ForegroundColor Yellow + { Write-Host "${Indent}WARNING: " -NoNewline -ForegroundColor Yellow Write-Host $InputObject } } - else + elseif ($InputObject -match ":\d+:\d+:\s") { $ErrorRecordFound = $true - Write-Host "ERROR: " -NoNewline -ForegroundColor Red + Write-Host "${Indent}ERROR: " -NoNewline -ForegroundColor Red Write-Host $InputObject } + else + { Write-Host "${Indent}$InputObject" } } else { Write-Host "Unsupported object in pipeline stream" } |