Compare commits
2 Commits
a21354b4b4
...
ab96945192
| Author | SHA1 | Date | |
|---|---|---|---|
| ab96945192 | |||
| 45342a3555 |
@@ -34,7 +34,7 @@ jobs:
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
conan install . --deployer=full_deploy --deployer-folder=build --remote=bigfootpackages -pr:h=clang -pr:b=clang --build=missing -s build_type=${{ matrix.build_type }} -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=False -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||
conan install . --deployer=full_deploy --deployer-folder=build --remote=bigfootpackages -pr:h=./ConanProfiles/clang -pr:b=./ConanProfiles/clang --build=missing -s build_type=${{ matrix.build_type }} -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=False -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||
cmake -S . -B ./build/${{ matrix.build_type }} --toolchain ./build/${{ matrix.build_type }}/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_UNITY_BUILD=${{ matrix.unity_build }} -G "Ninja"
|
||||
cmake --build build/${{ matrix.build_type }} --parallel $(nproc)
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
|
||||
- name: Generate
|
||||
run: |
|
||||
conan install . --deployer=full_deploy --deployer-folder=build --remote=bigfootpackages -pr:h=clang_coverage -pr:b=clang_coverage --build=missing -s build_type=Debug -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=False -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||
conan install . --deployer=full_deploy --deployer-folder=build --remote=bigfootpackages -pr:h=./ConanProfiles/clang_coverage -pr:b=./ConanProfiles/clang_coverage --build=missing -s build_type=Debug -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=False -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||
cmake -S . -B ./build/Debug --toolchain ./build/Debug/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Debug -G "Ninja"
|
||||
cmake --build build/Debug --parallel $(nproc)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <Engine/BigFile/Asset/Asset.hpp>
|
||||
#include <Engine/EngineAssertHandler.hpp>
|
||||
|
||||
#include <eastl/vector_map.h>
|
||||
#include <ankerl/unordered_dense.h>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
@@ -29,48 +29,46 @@ class AssetContainer
|
||||
AssetContainer(AssetContainer&& p_container) = delete;
|
||||
|
||||
[[nodiscard]]
|
||||
bool Add(const UUID& p_uuid, const eastl::string_view p_name)
|
||||
bool Add(const UUID& p_uuid)
|
||||
{
|
||||
FlatAssetWrapper<typename ASSET::FLAT_ASSET> flatAsset {};
|
||||
flatAsset.Asset().asset_header->uuid = p_uuid;
|
||||
flatAsset.Asset().asset_header->name = p_name;
|
||||
|
||||
return Add(p_uuid, flatAsset.Pack());
|
||||
return m_assets.emplace(p_uuid, AssetHandle {}).second;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
bool Add(const UUID& p_uuid, const eastl::span<const std::byte> p_flatBuffer)
|
||||
bool Load(const UUID& p_uuid, const eastl::span<const std::byte> p_flatBuffer)
|
||||
{
|
||||
const auto& added = m_assets.emplace(p_uuid, eastl::make_unique<AssetFlatAssetWrapperPair>(p_flatBuffer));
|
||||
if (!m_assets.contains(p_uuid))
|
||||
{
|
||||
const bool added = Add(p_uuid);
|
||||
ASSERT(EngineAssertHandler, added, "{} not added to AssetContainer! Already in container ?", p_uuid);
|
||||
}
|
||||
|
||||
AssetHandle& assetHandle = m_assets.at(p_uuid);
|
||||
if (assetHandle.m_assetPair)
|
||||
{
|
||||
SOFT_ASSERT(EngineAssertHandler, false, "{} already loaded!", p_uuid);
|
||||
return true;
|
||||
}
|
||||
|
||||
assetHandle.m_assetPair = eastl::make_unique<AssetHandle::Data>(p_flatBuffer);
|
||||
CRITICAL_ASSERT(EngineAssertHandler,
|
||||
!added.second || added.first->second->m_flatAsset.Asset().asset_header->uuid == p_uuid,
|
||||
"Added ASSET UUID does not match !");
|
||||
assetHandle.m_assetPair->m_flatAsset.Asset().asset_header->uuid == p_uuid,
|
||||
"Mismatch between expected UUID and deserialized UUID ! Got {}; Expected {}",
|
||||
assetHandle.m_assetPair->m_flatAsset.Asset().asset_header->uuid,
|
||||
p_uuid);
|
||||
|
||||
return added.second;
|
||||
return true;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
ASSET* Get(const UUID& p_uuid)
|
||||
void UnloadUnreferenced()
|
||||
{
|
||||
return m_assets.contains(p_uuid) ? &m_assets.at_key(p_uuid)->m_asset : nullptr;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
const ASSET* Get(const UUID& p_uuid) const
|
||||
{
|
||||
return m_assets.contains(p_uuid) ? &m_assets.at_key(p_uuid)->m_asset : nullptr;
|
||||
}
|
||||
|
||||
void Remove(const UUID& p_uuid)
|
||||
{
|
||||
m_assets.erase(p_uuid);
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
eastl::vector<std::byte> Pack(const UUID& p_uuid) const
|
||||
{
|
||||
return m_assets.contains(p_uuid) ? m_assets.at_key(p_uuid)->m_flatAsset.Pack() : eastl::vector<std::byte> {};
|
||||
for (auto& keyValue: m_assets)
|
||||
{
|
||||
if (keyValue.second.m_hardRefCount == 0 && keyValue.second.m_assetPair)
|
||||
{
|
||||
keyValue.second.m_assetPair.reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
~AssetContainer() = default;
|
||||
@@ -79,19 +77,38 @@ class AssetContainer
|
||||
AssetContainer& operator=(AssetContainer&& p_container) = delete;
|
||||
|
||||
private:
|
||||
struct AssetFlatAssetWrapperPair
|
||||
struct AssetHandle
|
||||
{
|
||||
AssetFlatAssetWrapperPair(const eastl::span<const std::byte> p_flatbuffer):
|
||||
m_flatAsset(p_flatbuffer),
|
||||
m_asset(&m_flatAsset)
|
||||
struct Data
|
||||
{
|
||||
}
|
||||
Data(const eastl::span<const std::byte> p_flatBuffer):
|
||||
m_flatAsset(p_flatBuffer),
|
||||
m_asset(&m_flatAsset)
|
||||
{
|
||||
}
|
||||
|
||||
FlatAssetWrapper<typename ASSET::FLAT_ASSET> m_flatAsset;
|
||||
ASSET m_asset;
|
||||
FlatAssetWrapper<typename ASSET::FLAT_ASSET> m_flatAsset;
|
||||
ASSET m_asset;
|
||||
};
|
||||
|
||||
eastl::unique_ptr<Data> m_assetPair = nullptr;
|
||||
|
||||
std::uint32_t m_hardRefCount = 0;
|
||||
std::uint32_t m_softRefCount = 0;
|
||||
};
|
||||
|
||||
eastl::vector_map<UUID, eastl::unique_ptr<AssetFlatAssetWrapperPair>> m_assets;
|
||||
// We use a segmented_map here to keep stable references
|
||||
ankerl::unordered_dense::segmented_map<UUID, AssetHandle> m_assets;
|
||||
};
|
||||
|
||||
template<BigfootAssetConcept ASSET>
|
||||
class HardRef
|
||||
{
|
||||
};
|
||||
|
||||
template<BigfootAssetConcept ASSET>
|
||||
class SoftRef
|
||||
{
|
||||
};
|
||||
} // namespace Bigfoot
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <Utils/TargetMacros.h>
|
||||
|
||||
#include <EngineTests/BigFile/Asset/AssetA.hpp>
|
||||
#include <EngineTests/BigFile/Asset/AssetA_generated.hpp>
|
||||
#include <EngineTests/BigFile/Asset/AssetB.hpp>
|
||||
#include <EngineTests/BigFileInfo_generated.hpp>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
@@ -38,6 +38,7 @@ class BigFileFixture: public ::testing::Test
|
||||
}
|
||||
|
||||
AssetAContainer m_assetAContainer;
|
||||
AssetBContainer m_assetBContainer;
|
||||
|
||||
BIGFOOT_NOT_OPTIMIZED_ONLY(Singleton<Log>::Lifetime m_loggerLifetime;)
|
||||
|
||||
@@ -55,30 +56,42 @@ TEST_F(BigFileFixture, Lol)
|
||||
FlatAssetWrapper<Flat::AssetA>::TypeName().size()));
|
||||
|
||||
UUID uuid;
|
||||
std::ignore = m_assetAContainer.Add(uuid, "Instance");
|
||||
std::ignore = m_assetAContainer.Add(uuid);
|
||||
|
||||
AssetA* test = m_assetAContainer.Get(uuid);
|
||||
FlatAssetWrapper<Flat::AssetA> test {};
|
||||
test.Asset().asset_header->name = "Instance";
|
||||
test.Asset().asset_header->uuid = uuid;
|
||||
|
||||
test->Health() = 100;
|
||||
test->Mana() = 42;
|
||||
const eastl::vector<std::byte> flatBuffer = test.Pack();
|
||||
|
||||
const eastl::vector<std::byte> flatbuffer = m_assetAContainer.Pack(uuid);
|
||||
m_assetAContainer.Remove(uuid);
|
||||
std::ignore = m_assetAContainer.Load(uuid, flatBuffer);
|
||||
m_assetAContainer.UnloadUnreferenced();
|
||||
|
||||
std::ignore = m_assetAContainer.Add(uuid, flatbuffer);
|
||||
std::ignore = m_assetAContainer.Add(UUID {}, "Instance2");
|
||||
std::ignore = m_assetAContainer.Add(UUID {}, "Instance3");
|
||||
// UUID uuid;
|
||||
// std::ignore = m_assetAContainer.Add(uuid, "Instance");
|
||||
|
||||
AssetA* test2 = m_assetAContainer.Get(uuid);
|
||||
// AssetA* test = m_assetAContainer.Get(uuid);
|
||||
|
||||
EXPECT_EQ(test2->Health(), 100);
|
||||
EXPECT_EQ(test2->Mana(), 42);
|
||||
// test->Health() = 100;
|
||||
// test->Mana() = 42;
|
||||
|
||||
EXPECT_STREQ(test2->AssetHeader()->name.c_str(), "Instance");
|
||||
EXPECT_EQ(test2->AssetHeader()->type_id, FlatAssetWrapper<Flat::AssetA>::TypeID());
|
||||
EXPECT_STREQ(test2->AssetHeader()->type_name.c_str(), FlatAssetWrapper<Flat::AssetA>::TypeName().data());
|
||||
EXPECT_EQ(test2->AssetHeader()->uuid, uuid);
|
||||
EXPECT_EQ(test2->AssetHeader()->version, 2);
|
||||
// const eastl::vector<std::byte> flatbuffer = m_assetAContainer.Pack(uuid);
|
||||
// m_assetAContainer.Remove(uuid);
|
||||
|
||||
// std::ignore = m_assetAContainer.Add(uuid, flatbuffer);
|
||||
// std::ignore = m_assetAContainer.Add(UUID {}, "Instance2");
|
||||
// std::ignore = m_assetAContainer.Add(UUID {}, "Instance3");
|
||||
|
||||
// AssetA* test2 = m_assetAContainer.Get(uuid);
|
||||
|
||||
// EXPECT_EQ(test2->Health(), 100);
|
||||
// EXPECT_EQ(test2->Mana(), 42);
|
||||
|
||||
// EXPECT_STREQ(test2->AssetHeader()->name.c_str(), "Instance");
|
||||
// EXPECT_EQ(test2->AssetHeader()->type_id, FlatAssetWrapper<Flat::AssetA>::TypeID());
|
||||
// EXPECT_STREQ(test2->AssetHeader()->type_name.c_str(), FlatAssetWrapper<Flat::AssetA>::TypeName().data());
|
||||
// EXPECT_EQ(test2->AssetHeader()->uuid, uuid);
|
||||
// EXPECT_EQ(test2->AssetHeader()->version, 2);
|
||||
}
|
||||
|
||||
UUID uuid;
|
||||
|
||||
@@ -2,6 +2,16 @@ include "Engine/BigFile/Asset/AssetHeader.fbs";
|
||||
|
||||
namespace Bigfoot.Flat;
|
||||
|
||||
struct AssetAHardRef (native_type: "::Bigfoot::HardRef<::Bigfoot::AssetA>")
|
||||
{
|
||||
uuid: UUID;
|
||||
}
|
||||
|
||||
struct AssetASoftRef (native_type: "::Bigfoot::SoftRef<::Bigfoot::AssetA>")
|
||||
{
|
||||
uuid: UUID;
|
||||
}
|
||||
|
||||
table AssetA
|
||||
{
|
||||
asset_header: AssetHeader;
|
||||
|
||||
@@ -24,12 +24,76 @@ static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
|
||||
namespace Bigfoot {
|
||||
namespace Flat {
|
||||
|
||||
struct AssetAHardRef;
|
||||
|
||||
struct AssetASoftRef;
|
||||
|
||||
struct AssetA;
|
||||
struct AssetABuilder;
|
||||
struct AssetAT;
|
||||
|
||||
inline const ::flatbuffers::TypeTable *AssetAHardRefTypeTable();
|
||||
|
||||
inline const ::flatbuffers::TypeTable *AssetASoftRefTypeTable();
|
||||
|
||||
inline const ::flatbuffers::TypeTable *AssetATypeTable();
|
||||
|
||||
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(1) AssetAHardRef FLATBUFFERS_FINAL_CLASS {
|
||||
private:
|
||||
Bigfoot::Flat::UUID uuid_;
|
||||
|
||||
public:
|
||||
struct Traits;
|
||||
static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||
return AssetAHardRefTypeTable();
|
||||
}
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Bigfoot.Flat.AssetAHardRef";
|
||||
}
|
||||
AssetAHardRef()
|
||||
: uuid_() {
|
||||
}
|
||||
AssetAHardRef(const Bigfoot::Flat::UUID &_uuid)
|
||||
: uuid_(_uuid) {
|
||||
}
|
||||
const Bigfoot::Flat::UUID &uuid() const {
|
||||
return uuid_;
|
||||
}
|
||||
};
|
||||
FLATBUFFERS_STRUCT_END(AssetAHardRef, 16);
|
||||
|
||||
struct AssetAHardRef::Traits {
|
||||
using type = AssetAHardRef;
|
||||
};
|
||||
|
||||
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(1) AssetASoftRef FLATBUFFERS_FINAL_CLASS {
|
||||
private:
|
||||
Bigfoot::Flat::UUID uuid_;
|
||||
|
||||
public:
|
||||
struct Traits;
|
||||
static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||
return AssetASoftRefTypeTable();
|
||||
}
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Bigfoot.Flat.AssetASoftRef";
|
||||
}
|
||||
AssetASoftRef()
|
||||
: uuid_() {
|
||||
}
|
||||
AssetASoftRef(const Bigfoot::Flat::UUID &_uuid)
|
||||
: uuid_(_uuid) {
|
||||
}
|
||||
const Bigfoot::Flat::UUID &uuid() const {
|
||||
return uuid_;
|
||||
}
|
||||
};
|
||||
FLATBUFFERS_STRUCT_END(AssetASoftRef, 16);
|
||||
|
||||
struct AssetASoftRef::Traits {
|
||||
using type = AssetASoftRef;
|
||||
};
|
||||
|
||||
struct AssetAT : public ::flatbuffers::NativeTable {
|
||||
typedef AssetA TableType;
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
@@ -170,6 +234,40 @@ inline ::flatbuffers::Offset<AssetA> AssetA::Pack(::flatbuffers::FlatBufferBuild
|
||||
_mana);
|
||||
}
|
||||
|
||||
inline const ::flatbuffers::TypeTable *AssetAHardRefTypeTable() {
|
||||
static const ::flatbuffers::TypeCode type_codes[] = {
|
||||
{ ::flatbuffers::ET_SEQUENCE, 0, 0 }
|
||||
};
|
||||
static const ::flatbuffers::TypeFunction type_refs[] = {
|
||||
Bigfoot::Flat::UUIDTypeTable
|
||||
};
|
||||
static const int64_t values[] = { 0, 16 };
|
||||
static const char * const names[] = {
|
||||
"uuid"
|
||||
};
|
||||
static const ::flatbuffers::TypeTable tt = {
|
||||
::flatbuffers::ST_STRUCT, 1, type_codes, type_refs, nullptr, values, names
|
||||
};
|
||||
return &tt;
|
||||
}
|
||||
|
||||
inline const ::flatbuffers::TypeTable *AssetASoftRefTypeTable() {
|
||||
static const ::flatbuffers::TypeCode type_codes[] = {
|
||||
{ ::flatbuffers::ET_SEQUENCE, 0, 0 }
|
||||
};
|
||||
static const ::flatbuffers::TypeFunction type_refs[] = {
|
||||
Bigfoot::Flat::UUIDTypeTable
|
||||
};
|
||||
static const int64_t values[] = { 0, 16 };
|
||||
static const char * const names[] = {
|
||||
"uuid"
|
||||
};
|
||||
static const ::flatbuffers::TypeTable tt = {
|
||||
::flatbuffers::ST_STRUCT, 1, type_codes, type_refs, nullptr, values, names
|
||||
};
|
||||
return &tt;
|
||||
}
|
||||
|
||||
inline const ::flatbuffers::TypeTable *AssetATypeTable() {
|
||||
static const ::flatbuffers::TypeCode type_codes[] = {
|
||||
{ ::flatbuffers::ET_SEQUENCE, 0, 0 },
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
include "EngineTests/BigFile/Asset/AssetA.fbs";
|
||||
|
||||
namespace Bigfoot.Flat;
|
||||
|
||||
struct AssetBHardRef (native_type: "::Bigfoot::HardRef<::Bigfoot::AssetB>")
|
||||
{
|
||||
uuid: UUID;
|
||||
}
|
||||
|
||||
struct AssetBSoftRef (native_type: "::Bigfoot::SoftRef<::Bigfoot::AssetB>")
|
||||
{
|
||||
uuid: UUID;
|
||||
}
|
||||
|
||||
table AssetB
|
||||
{
|
||||
asset_header: AssetHeader;
|
||||
|
||||
asset_a_hard_ref: AssetAHardRef (native_inline);
|
||||
}
|
||||
|
||||
root_type AssetB;
|
||||
@@ -0,0 +1,59 @@
|
||||
/*********************************************************************
|
||||
* \file AssetB.hpp
|
||||
*
|
||||
* \author Romain BOULLARD
|
||||
* \date February 2026
|
||||
*********************************************************************/
|
||||
#ifndef BIGFOOT_ENGINETESTS_ASSETB_HPP
|
||||
#define BIGFOOT_ENGINETESTS_ASSETB_HPP
|
||||
#include <Engine/BigFile/Asset/AssetContainer.hpp>
|
||||
|
||||
#include <EngineTests/BigFile/Asset/AssetA.hpp>
|
||||
#include <EngineTests/BigFile/Asset/AssetB_generated.hpp>
|
||||
|
||||
namespace Bigfoot
|
||||
{
|
||||
class AssetB
|
||||
{
|
||||
public:
|
||||
using FLAT_ASSET = Flat::AssetB;
|
||||
|
||||
AssetB(FlatAssetWrapper<Flat::AssetB>* p_flatAsset):
|
||||
m_flatAsset(p_flatAsset)
|
||||
{
|
||||
}
|
||||
|
||||
AssetB(const AssetB& p_assetB) = default;
|
||||
AssetB(AssetB&& p_assetB) = default;
|
||||
|
||||
[[nodiscard]]
|
||||
HardRef<AssetA> Health()
|
||||
{
|
||||
return m_flatAsset->Asset().asset_a_hard_ref;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
Flat::AssetHeaderT* AssetHeader()
|
||||
{
|
||||
return m_flatAsset->Asset().asset_header.get();
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
const Flat::AssetHeaderT* AssetHeader() const
|
||||
{
|
||||
return m_flatAsset->Asset().asset_header.get();
|
||||
}
|
||||
|
||||
~AssetB() = default;
|
||||
|
||||
AssetB& operator=(const AssetB& p_assetB) = default;
|
||||
AssetB& operator=(AssetB&& p_assetB) = default;
|
||||
|
||||
private:
|
||||
FlatAssetWrapper<Flat::AssetB>* m_flatAsset;
|
||||
};
|
||||
|
||||
using AssetBContainer = AssetContainer<AssetB>;
|
||||
} // namespace Bigfoot
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,321 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
|
||||
#ifndef FLATBUFFERS_GENERATED_ASSETB_BIGFOOT_FLAT_H_
|
||||
#define FLATBUFFERS_GENERATED_ASSETB_BIGFOOT_FLAT_H_
|
||||
|
||||
#include "flatbuffers/flatbuffers.h"
|
||||
|
||||
// Ensure the included flatbuffers.h is the same version as when this file was
|
||||
// generated, otherwise it may not be compatible.
|
||||
static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
|
||||
FLATBUFFERS_VERSION_MINOR == 12 &&
|
||||
FLATBUFFERS_VERSION_REVISION == 19,
|
||||
"Non-compatible flatbuffers version included");
|
||||
|
||||
#include "Engine/BigFile/Asset/AssetTypeID.hpp"
|
||||
#include "Engine/BigFile/Asset/AssetTypeID.hpp"
|
||||
#include "System/UUID/UUID.hpp"
|
||||
#include "EngineTests/BigFile/Asset/AssetA_generated.hpp"
|
||||
|
||||
#include "EASTL/unique_ptr.h"
|
||||
#include "EASTL/string.h"
|
||||
|
||||
namespace Bigfoot {
|
||||
namespace Flat {
|
||||
|
||||
struct AssetBHardRef;
|
||||
|
||||
struct AssetBSoftRef;
|
||||
|
||||
struct AssetB;
|
||||
struct AssetBBuilder;
|
||||
struct AssetBT;
|
||||
|
||||
inline const ::flatbuffers::TypeTable *AssetBHardRefTypeTable();
|
||||
|
||||
inline const ::flatbuffers::TypeTable *AssetBSoftRefTypeTable();
|
||||
|
||||
inline const ::flatbuffers::TypeTable *AssetBTypeTable();
|
||||
|
||||
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(1) AssetBHardRef FLATBUFFERS_FINAL_CLASS {
|
||||
private:
|
||||
Bigfoot::Flat::UUID uuid_;
|
||||
|
||||
public:
|
||||
struct Traits;
|
||||
static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||
return AssetBHardRefTypeTable();
|
||||
}
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Bigfoot.Flat.AssetBHardRef";
|
||||
}
|
||||
AssetBHardRef()
|
||||
: uuid_() {
|
||||
}
|
||||
AssetBHardRef(const Bigfoot::Flat::UUID &_uuid)
|
||||
: uuid_(_uuid) {
|
||||
}
|
||||
const Bigfoot::Flat::UUID &uuid() const {
|
||||
return uuid_;
|
||||
}
|
||||
};
|
||||
FLATBUFFERS_STRUCT_END(AssetBHardRef, 16);
|
||||
|
||||
struct AssetBHardRef::Traits {
|
||||
using type = AssetBHardRef;
|
||||
};
|
||||
|
||||
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(1) AssetBSoftRef FLATBUFFERS_FINAL_CLASS {
|
||||
private:
|
||||
Bigfoot::Flat::UUID uuid_;
|
||||
|
||||
public:
|
||||
struct Traits;
|
||||
static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||
return AssetBSoftRefTypeTable();
|
||||
}
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Bigfoot.Flat.AssetBSoftRef";
|
||||
}
|
||||
AssetBSoftRef()
|
||||
: uuid_() {
|
||||
}
|
||||
AssetBSoftRef(const Bigfoot::Flat::UUID &_uuid)
|
||||
: uuid_(_uuid) {
|
||||
}
|
||||
const Bigfoot::Flat::UUID &uuid() const {
|
||||
return uuid_;
|
||||
}
|
||||
};
|
||||
FLATBUFFERS_STRUCT_END(AssetBSoftRef, 16);
|
||||
|
||||
struct AssetBSoftRef::Traits {
|
||||
using type = AssetBSoftRef;
|
||||
};
|
||||
|
||||
struct AssetBT : public ::flatbuffers::NativeTable {
|
||||
typedef AssetB TableType;
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Bigfoot.Flat.AssetBT";
|
||||
}
|
||||
eastl::unique_ptr<Bigfoot::Flat::AssetHeaderT> asset_header{};
|
||||
::Bigfoot::HardRef<::Bigfoot::AssetA> asset_a_hard_ref{};
|
||||
AssetBT() = default;
|
||||
AssetBT(const AssetBT &o);
|
||||
AssetBT(AssetBT&&) FLATBUFFERS_NOEXCEPT = default;
|
||||
AssetBT &operator=(AssetBT o) FLATBUFFERS_NOEXCEPT;
|
||||
};
|
||||
|
||||
struct AssetB FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||
typedef AssetBT NativeTableType;
|
||||
typedef AssetBBuilder Builder;
|
||||
struct Traits;
|
||||
static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||
return AssetBTypeTable();
|
||||
}
|
||||
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||
return "Bigfoot.Flat.AssetB";
|
||||
}
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_ASSET_HEADER = 4,
|
||||
VT_ASSET_A_HARD_REF = 6
|
||||
};
|
||||
const Bigfoot::Flat::AssetHeader *asset_header() const {
|
||||
return GetPointer<const Bigfoot::Flat::AssetHeader *>(VT_ASSET_HEADER);
|
||||
}
|
||||
const Bigfoot::Flat::AssetAHardRef *asset_a_hard_ref() const {
|
||||
return GetStruct<const Bigfoot::Flat::AssetAHardRef *>(VT_ASSET_A_HARD_REF);
|
||||
}
|
||||
template <bool B = false>
|
||||
bool Verify(::flatbuffers::VerifierTemplate<B> &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyOffset(verifier, VT_ASSET_HEADER) &&
|
||||
verifier.VerifyTable(asset_header()) &&
|
||||
VerifyField<Bigfoot::Flat::AssetAHardRef>(verifier, VT_ASSET_A_HARD_REF, 1) &&
|
||||
verifier.EndTable();
|
||||
}
|
||||
AssetBT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
|
||||
void UnPackTo(AssetBT *_o, const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
|
||||
static ::flatbuffers::Offset<AssetB> Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetBT* _o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
};
|
||||
|
||||
struct AssetBBuilder {
|
||||
typedef AssetB Table;
|
||||
::flatbuffers::FlatBufferBuilder &fbb_;
|
||||
::flatbuffers::uoffset_t start_;
|
||||
void add_asset_header(::flatbuffers::Offset<Bigfoot::Flat::AssetHeader> asset_header) {
|
||||
fbb_.AddOffset(AssetB::VT_ASSET_HEADER, asset_header);
|
||||
}
|
||||
void add_asset_a_hard_ref(const Bigfoot::Flat::AssetAHardRef *asset_a_hard_ref) {
|
||||
fbb_.AddStruct(AssetB::VT_ASSET_A_HARD_REF, asset_a_hard_ref);
|
||||
}
|
||||
explicit AssetBBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||
: fbb_(_fbb) {
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
::flatbuffers::Offset<AssetB> Finish() {
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = ::flatbuffers::Offset<AssetB>(end);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline ::flatbuffers::Offset<AssetB> CreateAssetB(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
::flatbuffers::Offset<Bigfoot::Flat::AssetHeader> asset_header = 0,
|
||||
const Bigfoot::Flat::AssetAHardRef *asset_a_hard_ref = nullptr) {
|
||||
AssetBBuilder builder_(_fbb);
|
||||
builder_.add_asset_a_hard_ref(asset_a_hard_ref);
|
||||
builder_.add_asset_header(asset_header);
|
||||
return builder_.Finish();
|
||||
}
|
||||
|
||||
struct AssetB::Traits {
|
||||
using type = AssetB;
|
||||
static auto constexpr Create = CreateAssetB;
|
||||
};
|
||||
|
||||
::flatbuffers::Offset<AssetB> CreateAssetB(::flatbuffers::FlatBufferBuilder &_fbb, const AssetBT *_o, const ::flatbuffers::rehasher_function_t *_rehasher = nullptr);
|
||||
|
||||
inline AssetBT::AssetBT(const AssetBT &o)
|
||||
: asset_header((o.asset_header) ? new Bigfoot::Flat::AssetHeaderT(*o.asset_header) : nullptr),
|
||||
asset_a_hard_ref(o.asset_a_hard_ref) {
|
||||
}
|
||||
|
||||
inline AssetBT &AssetBT::operator=(AssetBT o) FLATBUFFERS_NOEXCEPT {
|
||||
std::swap(asset_header, o.asset_header);
|
||||
std::swap(asset_a_hard_ref, o.asset_a_hard_ref);
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline AssetBT *AssetB::UnPack(const ::flatbuffers::resolver_function_t *_resolver) const {
|
||||
auto _o = std::make_unique<AssetBT>();
|
||||
UnPackTo(_o.get(), _resolver);
|
||||
return _o.release();
|
||||
}
|
||||
|
||||
inline void AssetB::UnPackTo(AssetBT *_o, const ::flatbuffers::resolver_function_t *_resolver) const {
|
||||
(void)_o;
|
||||
(void)_resolver;
|
||||
{ auto _e = asset_header(); if (_e) { if(_o->asset_header) { _e->UnPackTo(_o->asset_header.get(), _resolver); } else { _o->asset_header = eastl::unique_ptr<Bigfoot::Flat::AssetHeaderT>(_e->UnPack(_resolver)); } } else if (_o->asset_header) { _o->asset_header.reset(); } }
|
||||
{ auto _e = asset_a_hard_ref(); if (_e) _o->asset_a_hard_ref = ::flatbuffers::UnPack(*_e); }
|
||||
}
|
||||
|
||||
inline ::flatbuffers::Offset<AssetB> CreateAssetB(::flatbuffers::FlatBufferBuilder &_fbb, const AssetBT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
||||
return AssetB::Pack(_fbb, _o, _rehasher);
|
||||
}
|
||||
|
||||
inline ::flatbuffers::Offset<AssetB> AssetB::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const AssetBT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
||||
(void)_rehasher;
|
||||
(void)_o;
|
||||
struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const AssetBT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
|
||||
auto _asset_header = _o->asset_header ? CreateAssetHeader(_fbb, _o->asset_header.get(), _rehasher) : 0;
|
||||
auto _asset_a_hard_ref = ::flatbuffers::Pack(_o->asset_a_hard_ref);
|
||||
return Bigfoot::Flat::CreateAssetB(
|
||||
_fbb,
|
||||
_asset_header,
|
||||
&_asset_a_hard_ref);
|
||||
}
|
||||
|
||||
inline const ::flatbuffers::TypeTable *AssetBHardRefTypeTable() {
|
||||
static const ::flatbuffers::TypeCode type_codes[] = {
|
||||
{ ::flatbuffers::ET_SEQUENCE, 0, 0 }
|
||||
};
|
||||
static const ::flatbuffers::TypeFunction type_refs[] = {
|
||||
Bigfoot::Flat::UUIDTypeTable
|
||||
};
|
||||
static const int64_t values[] = { 0, 16 };
|
||||
static const char * const names[] = {
|
||||
"uuid"
|
||||
};
|
||||
static const ::flatbuffers::TypeTable tt = {
|
||||
::flatbuffers::ST_STRUCT, 1, type_codes, type_refs, nullptr, values, names
|
||||
};
|
||||
return &tt;
|
||||
}
|
||||
|
||||
inline const ::flatbuffers::TypeTable *AssetBSoftRefTypeTable() {
|
||||
static const ::flatbuffers::TypeCode type_codes[] = {
|
||||
{ ::flatbuffers::ET_SEQUENCE, 0, 0 }
|
||||
};
|
||||
static const ::flatbuffers::TypeFunction type_refs[] = {
|
||||
Bigfoot::Flat::UUIDTypeTable
|
||||
};
|
||||
static const int64_t values[] = { 0, 16 };
|
||||
static const char * const names[] = {
|
||||
"uuid"
|
||||
};
|
||||
static const ::flatbuffers::TypeTable tt = {
|
||||
::flatbuffers::ST_STRUCT, 1, type_codes, type_refs, nullptr, values, names
|
||||
};
|
||||
return &tt;
|
||||
}
|
||||
|
||||
inline const ::flatbuffers::TypeTable *AssetBTypeTable() {
|
||||
static const ::flatbuffers::TypeCode type_codes[] = {
|
||||
{ ::flatbuffers::ET_SEQUENCE, 0, 0 },
|
||||
{ ::flatbuffers::ET_SEQUENCE, 0, 1 }
|
||||
};
|
||||
static const ::flatbuffers::TypeFunction type_refs[] = {
|
||||
Bigfoot::Flat::AssetHeaderTypeTable,
|
||||
Bigfoot::Flat::AssetAHardRefTypeTable
|
||||
};
|
||||
static const char * const names[] = {
|
||||
"asset_header",
|
||||
"asset_a_hard_ref"
|
||||
};
|
||||
static const ::flatbuffers::TypeTable tt = {
|
||||
::flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names
|
||||
};
|
||||
return &tt;
|
||||
}
|
||||
|
||||
inline const Bigfoot::Flat::AssetB *GetAssetB(const void *buf) {
|
||||
return ::flatbuffers::GetRoot<Bigfoot::Flat::AssetB>(buf);
|
||||
}
|
||||
|
||||
inline const Bigfoot::Flat::AssetB *GetSizePrefixedAssetB(const void *buf) {
|
||||
return ::flatbuffers::GetSizePrefixedRoot<Bigfoot::Flat::AssetB>(buf);
|
||||
}
|
||||
|
||||
template <bool B = false>
|
||||
inline bool VerifyAssetBBuffer(
|
||||
::flatbuffers::VerifierTemplate<B> &verifier) {
|
||||
return verifier.template VerifyBuffer<Bigfoot::Flat::AssetB>(nullptr);
|
||||
}
|
||||
|
||||
template <bool B = false>
|
||||
inline bool VerifySizePrefixedAssetBBuffer(
|
||||
::flatbuffers::VerifierTemplate<B> &verifier) {
|
||||
return verifier.template VerifySizePrefixedBuffer<Bigfoot::Flat::AssetB>(nullptr);
|
||||
}
|
||||
|
||||
inline void FinishAssetBBuffer(
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<Bigfoot::Flat::AssetB> root) {
|
||||
fbb.Finish(root);
|
||||
}
|
||||
|
||||
inline void FinishSizePrefixedAssetBBuffer(
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<Bigfoot::Flat::AssetB> root) {
|
||||
fbb.FinishSizePrefixed(root);
|
||||
}
|
||||
|
||||
inline eastl::unique_ptr<Bigfoot::Flat::AssetBT> UnPackAssetB(
|
||||
const void *buf,
|
||||
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
||||
return eastl::unique_ptr<Bigfoot::Flat::AssetBT>(GetAssetB(buf)->UnPack(res));
|
||||
}
|
||||
|
||||
inline eastl::unique_ptr<Bigfoot::Flat::AssetBT> UnPackSizePrefixedAssetB(
|
||||
const void *buf,
|
||||
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
||||
return eastl::unique_ptr<Bigfoot::Flat::AssetBT>(GetSizePrefixedAssetB(buf)->UnPack(res));
|
||||
}
|
||||
|
||||
} // namespace Flat
|
||||
} // namespace Bigfoot
|
||||
|
||||
#endif // FLATBUFFERS_GENERATED_ASSETB_BIGFOOT_FLAT_H_
|
||||
@@ -41,6 +41,8 @@ function(bigfoot_create_package_tests ParentFolder BigfootDependencies)
|
||||
add_executable(${PROJECT_NAME})
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX)
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/Include)
|
||||
|
||||
bigfoot_compile_flatbuffers("${BigfootDependencies}")
|
||||
|
||||
file(GLOB_RECURSE _BF_TEST_SOURCES
|
||||
@@ -60,8 +62,6 @@ function(bigfoot_create_package_tests ParentFolder BigfootDependencies)
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE ${BIGFOOT_CXX_FLAGS})
|
||||
target_link_options(${PROJECT_NAME} PRIVATE ${BIGFOOT_EXE_LINK_FLAGS})
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/Include)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE $<LINK_LIBRARY:WHOLE_ARCHIVE,${PackageName}>)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE gtest::gtest)
|
||||
|
||||
|
||||
26
ConanProfiles/clang
Normal file
26
ConanProfiles/clang
Normal file
@@ -0,0 +1,26 @@
|
||||
[settings]
|
||||
os=Linux
|
||||
arch=x86_64
|
||||
compiler=clang
|
||||
compiler.version=20
|
||||
compiler.libcxx=libstdc++11
|
||||
compiler.cppstd=20
|
||||
compiler.cstd=17
|
||||
build_type=Release
|
||||
[conf]
|
||||
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'}
|
||||
tools.cmake.cmaketoolchain:extra_variables*={'BIGFOOT_CXX_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror;-ffast-math;-fno-exceptions;-fno-rtti', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bigfoot', 'force': True}}
|
||||
tools.cmake.cmaketoolchain:extra_variables*={'BIGFOOT_C_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror;-ffast-math', 'cache': True, 'type': 'STRING', 'docstring': 'C flags for Bigfoot', 'force': True}}
|
||||
tools.cmake.cmaketoolchain:generator=Ninja
|
||||
tools.system.package_manager:mode=install
|
||||
tools.system.package_manager:sudo=True
|
||||
tools.build:compiler_executables={"c": "clang", "cpp": "clang++"}
|
||||
|
||||
tools.build:exelinkflags=["-fuse-ld=mold", "-flto"]
|
||||
tools.build:sharedlinkflags=["-fuse-ld=mold", "-flto"]
|
||||
|
||||
tools.build:cflags=["-flto"]
|
||||
tools.build:cxxflags=["-flto"]
|
||||
|
||||
[tool_requires]
|
||||
!cmake/*: cmake/[>=4.2]
|
||||
25
ConanProfiles/clang_coverage
Normal file
25
ConanProfiles/clang_coverage
Normal file
@@ -0,0 +1,25 @@
|
||||
[settings]
|
||||
os=Linux
|
||||
arch=x86_64
|
||||
compiler=clang
|
||||
compiler.version=20
|
||||
compiler.libcxx=libstdc++11
|
||||
compiler.cppstd=20
|
||||
compiler.cstd=17
|
||||
build_type=Debug
|
||||
[conf]
|
||||
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'}
|
||||
tools.cmake.cmaketoolchain:extra_variables*={'BIGFOOT_CXX_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror;-fno-exceptions;-fno-rtti;-fprofile-instr-generate;-fcoverage-mapping', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bigfoot', 'force': True}}
|
||||
tools.cmake.cmaketoolchain:extra_variables*={'BIGFOOT_C_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror;-fprofile-instr-generate;-fcoverage-mapping', 'cache': True, 'type': 'STRING', 'docstring': 'C flags for Bigfoot', 'force': True}}
|
||||
tools.cmake.cmaketoolchain:extra_variables*={'BIGFOOT_SHARED_LINK_FLAGS': {'value': '-fprofile-instr-generate', 'cache': True, 'type': 'STRING', 'docstring': 'SHARED link flags for Bigfoot', 'force': True}}
|
||||
tools.cmake.cmaketoolchain:extra_variables*={'BIGFOOT_EXE_LINK_FLAGS': {'value': '-fprofile-instr-generate', 'cache': True, 'type': 'STRING', 'docstring': 'EXE link flags for Bigfoot', 'force': True}}
|
||||
tools.cmake.cmaketoolchain:generator=Ninja
|
||||
tools.system.package_manager:mode=install
|
||||
tools.system.package_manager:sudo=True
|
||||
tools.build:compiler_executables={"c": "clang", "cpp": "clang++"}
|
||||
|
||||
tools.build:exelinkflags=["-fuse-ld=mold"]
|
||||
tools.build:sharedlinkflags=["-fuse-ld=mold"]
|
||||
|
||||
[tool_requires]
|
||||
!cmake/*: cmake/[>=4.2]
|
||||
23
ConanProfiles/clangd
Normal file
23
ConanProfiles/clangd
Normal file
@@ -0,0 +1,23 @@
|
||||
[settings]
|
||||
os=Linux
|
||||
arch=x86_64
|
||||
compiler=clang
|
||||
compiler.version=20
|
||||
compiler.libcxx=libstdc++11
|
||||
compiler.cppstd=20
|
||||
compiler.cstd=17
|
||||
build_type=Debug
|
||||
[conf]
|
||||
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'}
|
||||
tools.cmake.cmaketoolchain:extra_variables*={'BIGFOOT_CXX_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror;-ffast-math;-fno-exceptions;-fno-rtti', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bigfoot', 'force': True}}
|
||||
tools.cmake.cmaketoolchain:extra_variables*={'BIGFOOT_C_FLAGS': {'value': '-Wall;-Wextra;-Wpedantic;-Werror;-ffast-math', 'cache': True, 'type': 'STRING', 'docstring': 'C flags for Bigfoot', 'force': True}}
|
||||
tools.cmake.cmaketoolchain:generator=Ninja
|
||||
tools.system.package_manager:mode=install
|
||||
tools.system.package_manager:sudo=True
|
||||
tools.build:compiler_executables={"c": "clang", "cpp": "clang++"}
|
||||
|
||||
tools.build:exelinkflags=["-fuse-ld=mold"]
|
||||
tools.build:sharedlinkflags=["-fuse-ld=mold"]
|
||||
|
||||
[tool_requires]
|
||||
!cmake/*: cmake/[>=4.2]
|
||||
22
ConanProfiles/msvc
Normal file
22
ConanProfiles/msvc
Normal file
@@ -0,0 +1,22 @@
|
||||
[settings]
|
||||
os=Windows
|
||||
arch=x86_64
|
||||
compiler=msvc
|
||||
compiler.version=195
|
||||
compiler.cppstd=20
|
||||
compiler.cstd=17
|
||||
compiler.runtime=dynamic
|
||||
build_type=Release
|
||||
[conf]
|
||||
tools.cmake.cmaketoolchain:extra_variables={'BIGFOOT_CXX_FLAGS': {'value': '/W4;/WX;/EHs-;/D_HAS_EXCEPTIONS=0;/GR-;/fp:fast', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bigfoot', 'force': True}}
|
||||
tools.cmake.cmaketoolchain:extra_variables*={'BIGFOOT_C_FLAGS': {'value': '/W4;/WX;/fp:fast', 'cache': True, 'type': 'STRING', 'docstring': 'C flags for Bigfoot', 'force': True}}
|
||||
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/msvc_ccache.cmake
|
||||
|
||||
tools.build:exelinkflags=["/LTCG", "/INCREMENTAL:NO"]
|
||||
tools.build:sharedlinkflags=["/LTCG", "/INCREMENTAL:NO"]
|
||||
|
||||
tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/D_CRT_DECLARE_NONSTDC_NAMES=1", "/GL"]
|
||||
tools.build:cxxflags=["/Zc:preprocessor", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope", "/Zc:strictStrings", "/Zc:rvalueCast", "/Zc:hiddenFriend", "/Zc:externConstexpr", "/Zc:ternary", "/GL"]
|
||||
|
||||
[tool_requires]
|
||||
!cmake/*: cmake/[>=4.2]
|
||||
19
ConanProfiles/msvc_ccache.cmake
Normal file
19
ConanProfiles/msvc_ccache.cmake
Normal file
@@ -0,0 +1,19 @@
|
||||
# https://github.com/ccache/ccache/wiki/MS-Visual-Studio#usage-with-cmake
|
||||
|
||||
find_program(ccache_exe ccache)
|
||||
if(ccache_exe)
|
||||
file(COPY_FILE
|
||||
${ccache_exe} ${CMAKE_BINARY_DIR}/cl.exe
|
||||
ONLY_IF_DIFFERENT)
|
||||
|
||||
# By default Visual Studio generators will use /Zi which is not compatible
|
||||
# with ccache, so tell Visual Studio to use /Z7 instead.
|
||||
message(STATUS "Setting MSVC debug information format to 'Embedded'")
|
||||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>")
|
||||
|
||||
set(CMAKE_VS_GLOBALS
|
||||
"CLToolExe=cl.exe"
|
||||
"CLToolPath=${CMAKE_BINARY_DIR}"
|
||||
"UseMultiToolTask=true"
|
||||
)
|
||||
endif()
|
||||
19
ConanProfiles/msvcd
Normal file
19
ConanProfiles/msvcd
Normal file
@@ -0,0 +1,19 @@
|
||||
[settings]
|
||||
os=Windows
|
||||
arch=x86_64
|
||||
compiler=msvc
|
||||
compiler.version=195
|
||||
compiler.cppstd=20
|
||||
compiler.cstd=17
|
||||
compiler.runtime=dynamic
|
||||
build_type=Debug
|
||||
[conf]
|
||||
tools.cmake.cmaketoolchain:extra_variables={'BIGFOOT_CXX_FLAGS': {'value': '/W4;/WX;/EHs-;/D_HAS_EXCEPTIONS=0;/GR-;/fp:fast', 'cache': True, 'type': 'STRING', 'docstring': 'CXX flags for Bigfoot', 'force': True}}
|
||||
tools.cmake.cmaketoolchain:extra_variables*={'BIGFOOT_C_FLAGS': {'value': '/W4;/WX;/fp:fast', 'cache': True, 'type': 'STRING', 'docstring': 'C flags for Bigfoot', 'force': True}}
|
||||
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/msvc_ccache.cmake
|
||||
|
||||
tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/D_CRT_DECLARE_NONSTDC_NAMES=1"]
|
||||
tools.build:cxxflags=["/Zc:preprocessor", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope", "/Zc:strictStrings", "/Zc:rvalueCast", "/Zc:hiddenFriend", "/Zc:externConstexpr", "/Zc:ternary"]
|
||||
|
||||
[tool_requires]
|
||||
!cmake/*: cmake/[>=4.2]
|
||||
@@ -22,12 +22,9 @@ if "%~1"=="force" (
|
||||
REM Add the remote
|
||||
conan remote add bigfootpackages https://conan.romainboullard.com/artifactory/api/conan/BigfootPackages
|
||||
|
||||
REM Install the conan configuration
|
||||
conan config install https://git.romainboullard.com/BigfootDev/ConanProfiles.git
|
||||
|
||||
REM Install dependencies with the specified build option
|
||||
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=msvc -pr:b=msvc %build_option% -of build -s build_type=Release -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=msvcd -pr:b=msvcd %build_option% -of build -s build_type=RelWithDebInfo -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=msvcd -pr:b=msvcd %build_option% -of build -s build_type=Debug -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=./ConanProfiles/msvc -pr:b=./ConanProfiles/msvc %build_option% -of build -s build_type=Release -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=./ConanProfiles/msvcd -pr:b=./ConanProfiles/msvcd %build_option% -of build -s build_type=RelWithDebInfo -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=./ConanProfiles/msvcd -pr:b=./ConanProfiles/msvcd %build_option% -of build -s build_type=Debug -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||
|
||||
endlocal
|
||||
|
||||
@@ -9,18 +9,15 @@ fi
|
||||
# Add the remote
|
||||
conan remote add bigfootpackages https://conan.romainboullard.com/artifactory/api/conan/BigfootPackages
|
||||
|
||||
# Install the conan configuration
|
||||
conan config install https://git.romainboullard.com/BigfootDev/ConanProfiles.git
|
||||
|
||||
# Set the build option based on the argument
|
||||
if [ "$1" == "force" ]; then
|
||||
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=clang -pr:b=clang --build='*' -of build -s build_type=Release -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=clangd -pr:b=clangd --build='*' -of build -s build_type=RelWithDebInfo -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=clangd -pr:b=clangd --build='*' -of build -s build_type=Debug -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=./ConanProfiles/clang -pr:b=./ConanProfiles/clang --build='*' -of build -s build_type=Release -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=./ConanProfiles/clangd -pr:b=./ConanProfiles/clangd --build='*' -of build -s build_type=RelWithDebInfo -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=./ConanProfiles/clangd -pr:b=./ConanProfiles/clangd --build='*' -of build -s build_type=Debug -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||
elif [ "$1" == "missing" ]; then
|
||||
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=clang -pr:b=clang --build=missing -of build -s build_type=Release -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=clangd -pr:b=clangd --build=missing -of build -s build_type=RelWithDebInfo -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=clangd -pr:b=clangd --build=missing -of build -s build_type=Debug -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=./ConanProfiles/clang -pr:b=./ConanProfiles/clang --build=missing -of build -s build_type=Release -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=./ConanProfiles/clangd -pr:b=./ConanProfiles/clangd --build=missing -of build -s build_type=RelWithDebInfo -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||
conan install . --deployer=full_deploy --remote=bigfootpackages -pr:h=./ConanProfiles/clangd -pr:b=./ConanProfiles/clangd --build=missing -of build -s build_type=Debug -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
|
||||
else
|
||||
echo "Invalid argument: $1"
|
||||
echo "Usage: $0 [force|missing]"
|
||||
|
||||
Reference in New Issue
Block a user