V1 (#2)
Some checks failed
Conan Packaging / Package Bin2CPP/1.0.0 (push) Has been cancelled
Bin2CPP / Build & Test Debug with ./ConanProfiles/clangd (Unity Build: OFF) (push) Has been cancelled
Bin2CPP / Build & Test Debug with ./ConanProfiles/clangd (Unity Build: ON) (push) Has been cancelled
Bin2CPP / Build & Test Debug with ./ConanProfiles/clangd_asan (Unity Build: OFF) (push) Has been cancelled
Bin2CPP / Build & Test Debug with ./ConanProfiles/clangd_asan (Unity Build: ON) (push) Has been cancelled
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: OFF) (push) Has been cancelled
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: ON) (push) Has been cancelled
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clangd (Unity Build: OFF) (push) Has been cancelled
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clangd (Unity Build: ON) (push) Has been cancelled
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clangd_asan (Unity Build: OFF) (push) Has been cancelled
Bin2CPP / Build & Test Release with ./ConanProfiles/clangd (Unity Build: ON) (push) Has been cancelled
Bin2CPP / Build & Test Release with ./ConanProfiles/clangd_asan (Unity Build: OFF) (push) Has been cancelled
Bin2CPP / Build & Test Debug with ./ConanProfiles/clang (Unity Build: ON) (push) Has been cancelled
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clangd_asan (Unity Build: ON) (push) Has been cancelled
Bin2CPP / Build & Test Release with ./ConanProfiles/clang (Unity Build: OFF) (push) Has been cancelled
Bin2CPP / Build & Test Release with ./ConanProfiles/clang (Unity Build: ON) (push) Has been cancelled
Bin2CPP / Build & Test Release with ./ConanProfiles/clangd (Unity Build: OFF) (push) Has been cancelled
Bin2CPP / Build & Test Release with ./ConanProfiles/clangd_asan (Unity Build: ON) (push) Has been cancelled
Bin2CPP / Clang Format Checks (push) Has been cancelled
Bin2CPP / Build & Test Debug with ./ConanProfiles/clang (Unity Build: OFF) (push) Has been cancelled
Bin2CPP / Sonarqube (push) Has been cancelled

Reviewed-on: #2
Co-authored-by: Romain BOULLARD <romain.boullard@protonmail.com>
Co-committed-by: Romain BOULLARD <romain.boullard@protonmail.com>
This commit was merged in pull request #2.
This commit is contained in:
2026-03-29 09:30:59 +00:00
committed by Romain BOULLARD
parent 1f61574360
commit a116731e46
45 changed files with 1848 additions and 950 deletions

View File

@@ -5,13 +5,14 @@ import os
required_conan_version = ">=1.33.0"
class Bigfoot(ConanFile):
class Bin2CPP(ConanFile):
name = "bin2cpp"
homepage = "https://git.romainboullard.com/rboullard/Bin2CPP"
description = "A utility that converts files to CPP headers"
topics = ("utility")
license = "MIT"
version = "0.1.0"
version = "1.0.0"
package_type = "application"
# Binary configuration
settings = "os", "compiler", "build_type", "arch"
@@ -19,15 +20,24 @@ class Bigfoot(ConanFile):
"shared": [True, False],
"fPIC": [True, False],
"build_tests": [True, False],
"asan": [True, False],
"coverage": [True, False]
}
default_options = {
"shared": False,
"fPIC": True,
"build_tests": False,
"asan": False,
"coverage": False
}
generators = "CMakeDeps"
def export_sources(self):
copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder)
copy(self, os.path.join("Bin2CPP", "*"), self.recipe_folder, self.export_sources_folder)
copy(self, os.path.join("CMake", "*"), self.recipe_folder, self.export_sources_folder)
def layout(self):
cmake_layout(self)
@@ -35,32 +45,46 @@ class Bigfoot(ConanFile):
if self.settings.os == "Windows":
del self.options.fPIC
self.options['mimalloc'].override = True
self.options['mimalloc'].shared = True
if(self.settings.os == "Windows"):
self.options["mimalloc"].win_redirect = True
if(self.options.asan):
self.options["mimalloc"].asan = True
def requirements(self):
self.requires("quill/11.0.2", transitive_headers=True)
self.requires("eastl/3.27.01@bigfootdev/main", transitive_headers=True)
self.requires("magic_enum/0.9.7", transitive_headers=True)
self.requires("mimalloc/3.2.8@bigfootdev/main", transitive_headers=True)
self.requires("cli11/2.6.1@bigfootdev/main")
self.requires("rapidhash/3.0@bigfootdev/main", transitive_headers=True)
if(self.settings.build_type == "RelWithDebInfo" or self.settings.build_type == "Debug"):
self.requires("cpptrace/1.0.4", transitive_headers=True)
self.requires("cpptrace/1.0.4", transitive_headers=True)
if(self.options.build_tests):
self.test_requires("gtest/1.17.0")
def generate(self):
tc = CMakeToolchain(self)
tc.variables["BUILD_TESTS"] = self.options.build_tests
tc.variables["ASAN"] = self.options.asan
tc.variables["COVERAGE"] = self.options.coverage
tc.generate()
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
cmake.build()
def package(self):
copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
cmake = CMake(self)
cmake.install()
copy(self, "Bin2CPPTargets.cmake",
src=os.path.join(self.source_folder, "CMake"),
dst=os.path.join(self.package_folder, "bin"))
@property
def _module_path(self):
return os.path.join("bin", "Bin2CPPTargets.cmake")
def package_info(self):
self.cpp_info.set_property("cmake_build_modules", [self._module_path])