Skip to content

Commit 6d9b689

Browse files
Windows based Clangformat
1 parent 0bc6dbf commit 6d9b689

9 files changed

Lines changed: 30 additions & 52 deletions

File tree

Scripts/BuildEngine.ps1

Lines changed: 12 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -108,47 +108,20 @@ function Build([string]$configuration, [int]$VsVersion , [bool]$runBuild) {
108108
Write-Host "Building $systemName $architecture $configuration"
109109

110110
[string]$BuildDirectoryNameExtension = If ($isMultipleConfig) { "MultiConfig" } Else { $configuration }
111-
[string]$BuildDirectoryName = "../"+"builds/renderengine/Result." + $systemName + "." + $architecture + "." + $BuildDirectoryNameExtension
111+
[string]$BuildDirectoryName = "../"+"builds/renderengine"
112112
[string]$buildDirectoryPath = [IO.Path]::Combine($RepoRoot, $BuildDirectoryName)
113113
[string]$cMakeCacheVariableOverride = ""
114-
[string]$cMakeGenerator = ""
114+
[string]$cMakeGenerator = "Ninja"
115115

116116
# Create build directory
117117
if (-Not (Test-Path $buildDirectoryPath)) {
118118
$Null = New-Item -ItemType Directory -Path $BuildDirectoryPath -ErrorAction SilentlyContinue
119119
}
120120

121121
# Define CMake Generator argument
122-
switch ($systemName) {
123-
"Windows" {
124-
switch ($VsVersion) {
125-
2022 {
126-
$cMakeGenerator = "-G `"Visual Studio 17 2022`" -A $architecture"
127-
}
128-
Default {
129-
throw 'This version of Visual Studio is not supported'
130-
}
131-
}
132-
$cMakeCacheVariableOverride += ' -DCMAKE_CONFIGURATION_TYPES=Debug;Release '
133-
}
134-
"Linux" {
135-
$cMakeGenerator = "-G `"Ninja`""
136-
137-
# Set Linux build compiler
138-
$env:CC = 'gcc'
139-
$env:CXX = 'g++'
140-
}
141-
"Darwin" {
142-
$cMakeGenerator = "-G `"Xcode`""
143-
$cMakeCacheVariableOverride += ' ' + $submoduleCMakeOptions.FRAMEWORK -join ' '
144-
}
145-
Default {
146-
throw 'This system is not supported'
147-
}
148-
}
149-
122+
150123

151-
$cMakeArguments = " -S $repositoryRootPath -B $buildDirectoryPath $cMakeGenerator $cMakeCacheVariableOverride -DCMAKE_BUILD_TYPE=$configuration"
124+
$cMakeArguments = " -S $repositoryRootPath -B $buildDirectoryPath -G $cMakeGenerator $cMakeCacheVariableOverride -DCMAKE_BUILD_TYPE=$configuration"
152125

153126
# CMake Generation process
154127
Write-Host $cMakeArguments
@@ -207,15 +180,15 @@ if(-Not $LauncherOnly) {
207180
}
208181

209182

210-
# Run Shader Compilation
211-
#foreach ($config in $Configurations) {
212-
# $shaderCompileScript = Join-Path $PSScriptRoot -ChildPath "ShaderCompile.ps1"
213-
# & pwsh -File $shaderCompileScript -Configuration:$config -ForceRebuild:$true
214-
#}
183+
# Run Shader Compilation
184+
foreach ($config in $Configurations) {
185+
$shaderCompileScript = Join-Path $PSScriptRoot -ChildPath "ShaderCompile.ps1"
186+
& pwsh -File $shaderCompileScript -Configuration:$config -ForceRebuild:$true
187+
}
215188

216-
#if ($LASTEXITCODE -ne 0) {
217-
# Write-Error "Stopped build process..." -ErrorAction Stop
218-
#}
189+
if ($LASTEXITCODE -ne 0) {
190+
Write-Error "Stopped build process..." -ErrorAction Stop
191+
}
219192
}
220193

221194
# Run Engine Build

Tetragrama/Components/DockspaceUIComponent.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1+
#include <ImGuizmo.h>
12
#include <Tetragrama/Components/DockspaceUIComponent.h>
23
#include <Tetragrama/Editor.h>
4+
#include <Tetragrama/Helpers/UIComponentDrawerHelper.h>
35
#include <Tetragrama/Helpers/UIDispatcher.h>
46
#include <Tetragrama/Importers/AssimpImporter.h>
57
#include <Tetragrama/MessageToken.h>
68
#include <Tetragrama/Messengers/Messenger.h>
79
#include <ZEngine/Logging/LoggerDefinition.h>
8-
#include <Tetragrama/Helpers/UIComponentDrawerHelper.h>
910
#include <fmt/format.h>
10-
#include <ImGuizmo.h>
1111

1212
namespace fs = std::filesystem;
1313

Tetragrama/Components/HierarchyViewUIComponent.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#include <Tetragrama/Editor.h>
2-
#include <Tetragrama/Components/HierarchyViewUIComponent.h>
31
#include <ImGuizmo.h>
2+
#include <Tetragrama/Components/HierarchyViewUIComponent.h>
3+
#include <Tetragrama/Editor.h>
44
#include <Tetragrama/Inputs/Keyboard.h>
55
#include <Tetragrama/Inputs/Mouse.h>
66
#include <Tetragrama/MessageToken.h>

Tetragrama/Components/ProjectViewUIComponent.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#include <Tetragrama/Editor.h>
33
#include <Tetragrama/Helpers/SearchPatternAlgorithm.h>
44
#include <ZEngine/Helpers/MemoryOperations.h>
5-
#include <fstream>
65
#include <imgui.h>
6+
#include <fstream>
77

88
using namespace ZEngine::Helpers;
99

ZEngine/ZEngine/Core/CoroutineScheduler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace ZEngine::Core
1515
ReadyCallback Ready = nullptr;
1616
ExecuteCallback Action = nullptr;
1717

18-
operator bool() noexcept
18+
operator bool() noexcept
1919
{
2020
return (Ready && Action);
2121
}

ZEngine/ZEngine/Hardwares/VulkanDevice.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ namespace ZEngine::Hardwares
6363
VkBuffer Handle = VK_NULL_HANDLE;
6464
VmaAllocation Allocation = nullptr;
6565

66-
operator bool() const
66+
operator bool() const
6767
{
6868
return (Handle != VK_NULL_HANDLE);
6969
}
@@ -77,7 +77,7 @@ namespace ZEngine::Hardwares
7777
VkSampler Sampler{VK_NULL_HANDLE};
7878
VmaAllocation Allocation{nullptr};
7979

80-
operator bool() const
80+
operator bool() const
8181
{
8282
return (Handle != VK_NULL_HANDLE);
8383
}

ZEngine/ZEngine/Helpers/HandleManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace ZEngine::Helpers
2020
{
2121
unsigned long long Index = std::numeric_limits<unsigned long long>::max();
2222

23-
bool Valid() const
23+
bool Valid() const
2424
{
2525
return Index != UINT32_MAX;
2626
}

ZEngine/ZEngine/Rendering/Renderers/Pipelines/RendererPipeline.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include <ZEngine/Hardwares/VulkanDevice.h>
22
#include <ZEngine/Rendering/Renderers/Pipelines/RendererPipeline.h>
3+
#include <array>
34

45
using namespace ZEngine::Helpers;
56
using namespace ZEngine::Core::Containers;

externals.cmake

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@ FetchContent_Declare(
1212
imgui
1313
GIT_REPOSITORY https://github.com/ocornut/imgui.git
1414
GIT_SHALLOW TRUE
15-
GIT_TAG v1.89.9-docking)
15+
GIT_TAG v1.89.9-docking
16+
)
1617

1718
FetchContent_Declare(
18-
ImGuizmo
19+
imguizmo
1920
GIT_REPOSITORY https://github.com/CedricGuillemet/ImGuizmo.git
2021
GIT_SHALLOW TRUE
21-
GIT_TAG 1.83)
22+
GIT_TAG 1.83
23+
)
2224

2325
FetchContent_Declare(
2426
stbimage
@@ -105,7 +107,9 @@ Fetchcontent_Declare(
105107
GTest
106108
GIT_REPOSITORY https://github.com/google/googletest.git
107109
GIT_SHALLOW TRUE
108-
FIND_PACKAGE_ARGS )
110+
GIT_TAG main
111+
FIND_PACKAGE_ARGS
112+
)
109113

110114
Fetchcontent_Declare(
111115
nlohmann_json

0 commit comments

Comments
 (0)