From 5703e25773330d421e49832336bc12c6d534b6b6 Mon Sep 17 00:00:00 2001 From: Romain BOULLARD Date: Fri, 11 Sep 2026 23:54:15 +0200 Subject: [PATCH] Fix benchmarks not setuping LOG correctly --- Bigfoot/Benchmarks/Engine/main.cpp | 26 +++++++++++++++++++ .../Graphics/GraphicsCore/GraphicsCore.cpp | 1 - .../Benchmarks/Graphics/GraphicsCore/main.cpp | 26 +++++++++++++++++++ .../GraphicsVulkan/GraphicsVulkan.cpp | 1 - .../Graphics/GraphicsVulkan/main.cpp | 26 +++++++++++++++++++ Bigfoot/Benchmarks/Utils/main.cpp | 26 +++++++++++++++++++ .../Tests/Engine/{EngineTests => }/main.cpp | 0 .../{GraphicsCoreTests => }/main.cpp | 0 .../{GraphicsVulkanTests => }/main.cpp | 0 .../Tests/System/{SystemTests => }/main.cpp | 0 Bigfoot/Tests/Utils/{UtilsTests => }/main.cpp | 0 CMake/Package.cmake | 2 +- Tools/Benchmarks/SasquatchBaker/main.cpp | 26 +++++++++++++++++++ .../{SasquatchBakerTests => }/main.cpp | 0 14 files changed, 131 insertions(+), 3 deletions(-) create mode 100644 Bigfoot/Benchmarks/Engine/main.cpp delete mode 100644 Bigfoot/Benchmarks/Graphics/GraphicsCore/GraphicsCore.cpp create mode 100644 Bigfoot/Benchmarks/Graphics/GraphicsCore/main.cpp delete mode 100644 Bigfoot/Benchmarks/Graphics/GraphicsVulkan/GraphicsVulkan.cpp create mode 100644 Bigfoot/Benchmarks/Graphics/GraphicsVulkan/main.cpp create mode 100644 Bigfoot/Benchmarks/Utils/main.cpp rename Bigfoot/Tests/Engine/{EngineTests => }/main.cpp (100%) rename Bigfoot/Tests/Graphics/GraphicsCore/{GraphicsCoreTests => }/main.cpp (100%) rename Bigfoot/Tests/Graphics/GraphicsVulkan/{GraphicsVulkanTests => }/main.cpp (100%) rename Bigfoot/Tests/System/{SystemTests => }/main.cpp (100%) rename Bigfoot/Tests/Utils/{UtilsTests => }/main.cpp (100%) create mode 100644 Tools/Benchmarks/SasquatchBaker/main.cpp rename Tools/Tests/SasquatchBaker/{SasquatchBakerTests => }/main.cpp (100%) diff --git a/Bigfoot/Benchmarks/Engine/main.cpp b/Bigfoot/Benchmarks/Engine/main.cpp new file mode 100644 index 0000000..2aa2179 --- /dev/null +++ b/Bigfoot/Benchmarks/Engine/main.cpp @@ -0,0 +1,26 @@ +/********************************************************************* + * \file main.cpp + * + * \author Romain BOULLARD + * \date September 2026 + *********************************************************************/ +#include +#include + +#include + +int main(int argc, char** argv) +{ + BIGFOOT_NOT_OPTIMIZED_ONLY(::Bigfoot::Singleton<::Bigfoot::Log>::Lifetime m_lifetime); + + ::benchmark::Initialize(&argc, argv); + if (::benchmark::ReportUnrecognizedArguments(argc, argv)) + { + return 1; + } + + ::benchmark::RunSpecifiedBenchmarks(); + ::benchmark::Shutdown(); + + return 0; +} diff --git a/Bigfoot/Benchmarks/Graphics/GraphicsCore/GraphicsCore.cpp b/Bigfoot/Benchmarks/Graphics/GraphicsCore/GraphicsCore.cpp deleted file mode 100644 index 8fe106f..0000000 --- a/Bigfoot/Benchmarks/Graphics/GraphicsCore/GraphicsCore.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/Bigfoot/Benchmarks/Graphics/GraphicsCore/main.cpp b/Bigfoot/Benchmarks/Graphics/GraphicsCore/main.cpp new file mode 100644 index 0000000..2aa2179 --- /dev/null +++ b/Bigfoot/Benchmarks/Graphics/GraphicsCore/main.cpp @@ -0,0 +1,26 @@ +/********************************************************************* + * \file main.cpp + * + * \author Romain BOULLARD + * \date September 2026 + *********************************************************************/ +#include +#include + +#include + +int main(int argc, char** argv) +{ + BIGFOOT_NOT_OPTIMIZED_ONLY(::Bigfoot::Singleton<::Bigfoot::Log>::Lifetime m_lifetime); + + ::benchmark::Initialize(&argc, argv); + if (::benchmark::ReportUnrecognizedArguments(argc, argv)) + { + return 1; + } + + ::benchmark::RunSpecifiedBenchmarks(); + ::benchmark::Shutdown(); + + return 0; +} diff --git a/Bigfoot/Benchmarks/Graphics/GraphicsVulkan/GraphicsVulkan.cpp b/Bigfoot/Benchmarks/Graphics/GraphicsVulkan/GraphicsVulkan.cpp deleted file mode 100644 index e3abd0a..0000000 --- a/Bigfoot/Benchmarks/Graphics/GraphicsVulkan/GraphicsVulkan.cpp +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/Bigfoot/Benchmarks/Graphics/GraphicsVulkan/main.cpp b/Bigfoot/Benchmarks/Graphics/GraphicsVulkan/main.cpp new file mode 100644 index 0000000..2aa2179 --- /dev/null +++ b/Bigfoot/Benchmarks/Graphics/GraphicsVulkan/main.cpp @@ -0,0 +1,26 @@ +/********************************************************************* + * \file main.cpp + * + * \author Romain BOULLARD + * \date September 2026 + *********************************************************************/ +#include +#include + +#include + +int main(int argc, char** argv) +{ + BIGFOOT_NOT_OPTIMIZED_ONLY(::Bigfoot::Singleton<::Bigfoot::Log>::Lifetime m_lifetime); + + ::benchmark::Initialize(&argc, argv); + if (::benchmark::ReportUnrecognizedArguments(argc, argv)) + { + return 1; + } + + ::benchmark::RunSpecifiedBenchmarks(); + ::benchmark::Shutdown(); + + return 0; +} diff --git a/Bigfoot/Benchmarks/Utils/main.cpp b/Bigfoot/Benchmarks/Utils/main.cpp new file mode 100644 index 0000000..2aa2179 --- /dev/null +++ b/Bigfoot/Benchmarks/Utils/main.cpp @@ -0,0 +1,26 @@ +/********************************************************************* + * \file main.cpp + * + * \author Romain BOULLARD + * \date September 2026 + *********************************************************************/ +#include +#include + +#include + +int main(int argc, char** argv) +{ + BIGFOOT_NOT_OPTIMIZED_ONLY(::Bigfoot::Singleton<::Bigfoot::Log>::Lifetime m_lifetime); + + ::benchmark::Initialize(&argc, argv); + if (::benchmark::ReportUnrecognizedArguments(argc, argv)) + { + return 1; + } + + ::benchmark::RunSpecifiedBenchmarks(); + ::benchmark::Shutdown(); + + return 0; +} diff --git a/Bigfoot/Tests/Engine/EngineTests/main.cpp b/Bigfoot/Tests/Engine/main.cpp similarity index 100% rename from Bigfoot/Tests/Engine/EngineTests/main.cpp rename to Bigfoot/Tests/Engine/main.cpp diff --git a/Bigfoot/Tests/Graphics/GraphicsCore/GraphicsCoreTests/main.cpp b/Bigfoot/Tests/Graphics/GraphicsCore/main.cpp similarity index 100% rename from Bigfoot/Tests/Graphics/GraphicsCore/GraphicsCoreTests/main.cpp rename to Bigfoot/Tests/Graphics/GraphicsCore/main.cpp diff --git a/Bigfoot/Tests/Graphics/GraphicsVulkan/GraphicsVulkanTests/main.cpp b/Bigfoot/Tests/Graphics/GraphicsVulkan/main.cpp similarity index 100% rename from Bigfoot/Tests/Graphics/GraphicsVulkan/GraphicsVulkanTests/main.cpp rename to Bigfoot/Tests/Graphics/GraphicsVulkan/main.cpp diff --git a/Bigfoot/Tests/System/SystemTests/main.cpp b/Bigfoot/Tests/System/main.cpp similarity index 100% rename from Bigfoot/Tests/System/SystemTests/main.cpp rename to Bigfoot/Tests/System/main.cpp diff --git a/Bigfoot/Tests/Utils/UtilsTests/main.cpp b/Bigfoot/Tests/Utils/main.cpp similarity index 100% rename from Bigfoot/Tests/Utils/UtilsTests/main.cpp rename to Bigfoot/Tests/Utils/main.cpp diff --git a/CMake/Package.cmake b/CMake/Package.cmake index 3355a69..6dc5536 100644 --- a/CMake/Package.cmake +++ b/CMake/Package.cmake @@ -219,7 +219,7 @@ function(bigfoot_create_package_benchmarks ParentFolder) PRIVATE BigfootCompileAndLinkFlags $ - benchmark::benchmark_main) + benchmark::benchmark) bigfoot_compile_flatbuffers() diff --git a/Tools/Benchmarks/SasquatchBaker/main.cpp b/Tools/Benchmarks/SasquatchBaker/main.cpp new file mode 100644 index 0000000..2aa2179 --- /dev/null +++ b/Tools/Benchmarks/SasquatchBaker/main.cpp @@ -0,0 +1,26 @@ +/********************************************************************* + * \file main.cpp + * + * \author Romain BOULLARD + * \date September 2026 + *********************************************************************/ +#include +#include + +#include + +int main(int argc, char** argv) +{ + BIGFOOT_NOT_OPTIMIZED_ONLY(::Bigfoot::Singleton<::Bigfoot::Log>::Lifetime m_lifetime); + + ::benchmark::Initialize(&argc, argv); + if (::benchmark::ReportUnrecognizedArguments(argc, argv)) + { + return 1; + } + + ::benchmark::RunSpecifiedBenchmarks(); + ::benchmark::Shutdown(); + + return 0; +} diff --git a/Tools/Tests/SasquatchBaker/SasquatchBakerTests/main.cpp b/Tools/Tests/SasquatchBaker/main.cpp similarity index 100% rename from Tools/Tests/SasquatchBaker/SasquatchBakerTests/main.cpp rename to Tools/Tests/SasquatchBaker/main.cpp