Skip to content

Commit 43bbf62

Browse files
Scripting Fixes
1 parent ffabba7 commit 43bbf62

2 files changed

Lines changed: 26 additions & 33 deletions

File tree

CMakePresets.json

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"configurePresets":[
99
{
10-
"name": "Debug_Windows",
10+
"name": "Windows_Debug",
1111
"displayName": "Windows Visual Studio Debug",
1212
"generator": "Visual Studio 2022",
1313
"binaryDir": "${sourceDir}/../builds/RendererEngine",
@@ -59,72 +59,66 @@
5959
}
6060
},
6161
{
62-
"name": "Release_Windows",
62+
"name": "Windows_Release",
6363
"displayName": "Windows Visual Studio Release",
64-
"inherits": "Debug_Windows",
64+
"inherits": "Windows_Debug",
6565
"cacheVariables": {
6666
"CMAKE_BUILD_TYPE": "Release"
6767
}
6868
},
6969

70-
# Mac Os
7170
{
72-
"name": "Debug_MacOS",
73-
"inherits": "Debug_Windows",
71+
"name": "MacOS_Debug",
72+
"inherits": "Windows_Debug",
7473
"displayName": "MacOS XCode Debug",
75-
"generator": "Xcode",
74+
"generator": "Xcode"
7675
},
7776
{
78-
"name": "Release_MacOS",
79-
"inherits": "Release_Windows",
77+
"name": "MacOS_Release",
78+
"inherits": "Windows_Release",
8079
"displayName": "MacOS XCode Release",
8180
"generator": "Xcode"
8281
},
8382

84-
# Linux
8583
{
86-
"name": "Debug_Linux",
87-
"inherits": "Debug_Windows",
84+
"name": "Linux_Debug",
85+
"inherits": "Windows_Debug",
8886
"displayName": "Linux Ninja Debug",
89-
"generator": "Xcode",
87+
"generator": "Ninja"
9088
},
9189
{
92-
"name": "Release_Linux",
93-
"inherits": "Release_Windows",
90+
"name": "Linux_Release",
91+
"inherits": "Windows_Release",
9492
"displayName": "Linux Ninja Release",
95-
"generator": "Xcode"
96-
},
97-
98-
93+
"generator": "Ninja"
94+
}
9995
],
96+
10097
"buildPresets": [
101-
# Windows Builds
10298
{
103-
"name": "Windows_Debug_Build",
99+
"name": "Windows_Debug",
104100
"configurePreset": "Windows_Debug"
105101
},
106102
{
107-
"name": "Windows_Release_Build",
103+
"name": "Windows_Release",
108104
"configurePreset": "Windows_Release"
109105
},
110106

111-
# MacOS Builds
112107
{
113-
"name": "MacOS_Debug_Build",
108+
"name": "MacOS_Debug",
114109
"configurePreset": "MacOS_Debug"
115110
},
116111
{
117-
"name": "MacOS_Release_Build",
112+
"name": "MacOS_Release",
118113
"configurePreset": "MacOS_Release"
119114
},
120115

121-
# Linux Builds
122116
{
123-
"name": "Linux_Debug_Build",
117+
"name": "Linux_Debug",
124118
"configurePreset": "Linux_Debug"
125119
},
126120
{
127-
"name": "Linux_Release_Build",
121+
"name": "Linux_Release",
128122
"configurePreset": "Linux_Release"
129123
}
130124
]

Scripts/BuildEngine.ps1

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,22 +102,21 @@ function Build([string]$configuration, [int]$VsVersion , [bool]$runBuild) {
102102
if($IsMacOS) {
103103
$cMakePreset = "MacOS_$configuration"
104104
}
105-
}
106105

107106
$cMakeArguments = "--preset $cmakePreset"
108107

109108
# CMake Generation process
110-
Write-Host "Creating Build for Preset $cMakeArguments"
109+
Write-Host "Creating Build for Preset $cMakePreset"
111110
$cMakeProcess = Start-Process $cMakeProgram -ArgumentList $cMakeArguments -NoNewWindow -Wait -PassThru
112111
if ($cMakeProcess.ExitCode -ne 0 ) {
113-
throw "cmake failed generation for '$cMakeArguments' with exit code '$cMakeProcess.ExitCode'"
112+
throw "cmake failed generation for '$cMakePreset' with exit code '$cMakeProcess.ExitCode'"
114113
}
115114

116115
# CMake Build Process
117116
#
118117
if ($runBuild) {
119118

120-
$buildArguments = "--build --preset $cmakePreset_Build"
119+
$buildArguments = "--build --preset $cmakePreset"
121120

122121
$buildProcess = Start-Process $cMakeProgram -ArgumentList $buildArguments -NoNewWindow -PassThru
123122

@@ -127,7 +126,7 @@ function Build([string]$configuration, [int]$VsVersion , [bool]$runBuild) {
127126
$processHandle = $buildProcess.Handle
128127
$buildProcess.WaitForExit();
129128
if ($buildProcess.ExitCode -ne 0) {
130-
throw "cmake failed build for '$buildArguments' with exit code '$buildProcess.ExitCode'"
129+
throw "cmake failed build for '$cmakePreset' with exit code '$buildProcess.ExitCode'"
131130
}
132131
}
133132
}

0 commit comments

Comments
 (0)