-
Notifications
You must be signed in to change notification settings - Fork 5
/
ChangeGeneratorToVS2019.ps1
28 lines (24 loc) · 1.14 KB
/
ChangeGeneratorToVS2019.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function Update-CMakeFile() {
param([string] $fileName)
(Get-Content $fileName) |
ForEach-Object{$_ -replace '-G "Visual Studio 15 2017 Win64"','-G "Visual Studio 16 2019" -A x64'} |
Set-Content $fileName
}
function Update-JsonFile() {
param([string] $fileName)
$text = [string]::Join("`r`n", (Get-Content $fileName))
[regex]::Replace($text,
"""generator"": ""Visual Studio 15 2017 Win64"",",
"""generator"": ""Visual Studio 16 2019"",`r`n ""architecture"": ""x64"",",
"SingleLine") |
Set-Content $fileName -NoNewline
}
Update-CMakeFile .\build.cmake
Update-CMakeFile .\CMakeLists.txt
Update-JsonFile .\tests\export_cmake_and_install\CMakeSettings.json
Update-JsonFile .\tests\export_simple_cmake\CMakeSettings.json
Update-JsonFile .\tests\export_simple_dot_targets\CMakeSettings.json
Update-JsonFile .\tests\export_simple_toolchain\CMakeSettings.json
Update-JsonFile .\tests\write_autopkg_nested\CMakeSettings.json
Update-JsonFile .\tests\write_autopkg_simple\CMakeSettings.json
Update-JsonFile .\tests\write_nuspec_simple\CMakeSettings.json