mirror of https://github.com/mono/CppSharp.git
1 changed files with 14 additions and 6 deletions
@ -1,8 +1,16 @@ |
|||||||
$intrin = 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.28.29333/include/intrin0.h' |
$intrin = @( |
||||||
if (!(Test-Path $intrin)) { |
'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.28.29333/include/intrin0.h', |
||||||
Write-Warning "This hack is no longer needed and should be removed." |
'C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/include/intrin0.h', |
||||||
|
'C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.28.29333/include/intrin0.h') |
||||||
|
$patched = $false |
||||||
|
for ($i = 0; $i -lt $intrin.Length; $i++) { |
||||||
|
if (Test-Path $intrin[$i]) { |
||||||
|
$content = ((Get-Content $intrin[$i]) -replace 'ifdef __clang__', 'ifdef __avoid_this_path__') |
||||||
|
[IO.File]::WriteAllLines($intrin[$i], $content) |
||||||
|
$patched = $true |
||||||
|
} |
||||||
} |
} |
||||||
else { |
|
||||||
$content = ((Get-Content $intrin) -replace 'ifdef __clang__', 'ifdef __avoid_this_path__') |
if (!$patched) { |
||||||
[IO.File]::WriteAllLines($intrin, $content) |
Write-Warning "This hack is no longer needed and should be removed." |
||||||
} |
} |
||||||
|
|||||||
Loading…
Reference in new issue