From debc7725817a175aa2bad8ac6c1c07dc8fb2bc45 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Fri, 24 Jun 2016 09:41:03 +0200 Subject: Reworked standard libraries compile flow (std, ieee, ...). Fixed GHDL version test issue. Extended .gitignore to exclude generated files on Windows and Linux. --- libraries/vendors/shared.psm1 | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'libraries') diff --git a/libraries/vendors/shared.psm1 b/libraries/vendors/shared.psm1 index 97a196fd3..d3b93c43e 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" } -- cgit v1.2.3