V1 Hotfix (#4)
All checks were successful
Bin2CPP / Build & Test Debug with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 1m0s
Bin2CPP / Build & Test Debug with ./ConanProfiles/clangd (Unity Build: ON) (push) Successful in 48s
Bin2CPP / Build & Test Debug with ./ConanProfiles/clangd_asan (Unity Build: OFF) (push) Successful in 59s
Bin2CPP / Build & Test Debug with ./ConanProfiles/clangd_asan (Unity Build: ON) (push) Successful in 59s
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clangd_asan (Unity Build: ON) (push) Successful in 1m35s
Bin2CPP / Build & Test Debug with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 1m2s
Bin2CPP / Build & Test Debug with ./ConanProfiles/clangd (Unity Build: OFF) (push) Successful in 48s
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 1m18s
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 1m18s
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clangd (Unity Build: OFF) (push) Successful in 1m9s
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clangd (Unity Build: ON) (push) Successful in 1m8s
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clangd_asan (Unity Build: OFF) (push) Successful in 1m33s
Bin2CPP / Build & Test Release with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 1m5s
Bin2CPP / Build & Test Release with ./ConanProfiles/clangd (Unity Build: OFF) (push) Successful in 58s
Bin2CPP / Build & Test Release with ./ConanProfiles/clangd (Unity Build: ON) (push) Successful in 57s
Bin2CPP / Build & Test Release with ./ConanProfiles/clangd_asan (Unity Build: OFF) (push) Successful in 1m17s
Bin2CPP / Build & Test Release with ./ConanProfiles/clangd_asan (Unity Build: ON) (push) Successful in 1m22s
Bin2CPP / Clang Format Checks (push) Successful in 9s
Bin2CPP / Build & Test Release with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 1m8s
Conan Packaging / Package Bin2CPP/1.0.0 (push) Successful in 1m14s
Bin2CPP / Sonarqube (push) Successful in 1m42s
All checks were successful
Bin2CPP / Build & Test Debug with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 1m0s
Bin2CPP / Build & Test Debug with ./ConanProfiles/clangd (Unity Build: ON) (push) Successful in 48s
Bin2CPP / Build & Test Debug with ./ConanProfiles/clangd_asan (Unity Build: OFF) (push) Successful in 59s
Bin2CPP / Build & Test Debug with ./ConanProfiles/clangd_asan (Unity Build: ON) (push) Successful in 59s
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clangd_asan (Unity Build: ON) (push) Successful in 1m35s
Bin2CPP / Build & Test Debug with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 1m2s
Bin2CPP / Build & Test Debug with ./ConanProfiles/clangd (Unity Build: OFF) (push) Successful in 48s
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 1m18s
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 1m18s
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clangd (Unity Build: OFF) (push) Successful in 1m9s
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clangd (Unity Build: ON) (push) Successful in 1m8s
Bin2CPP / Build & Test RelWithDebInfo with ./ConanProfiles/clangd_asan (Unity Build: OFF) (push) Successful in 1m33s
Bin2CPP / Build & Test Release with ./ConanProfiles/clang (Unity Build: OFF) (push) Successful in 1m5s
Bin2CPP / Build & Test Release with ./ConanProfiles/clangd (Unity Build: OFF) (push) Successful in 58s
Bin2CPP / Build & Test Release with ./ConanProfiles/clangd (Unity Build: ON) (push) Successful in 57s
Bin2CPP / Build & Test Release with ./ConanProfiles/clangd_asan (Unity Build: OFF) (push) Successful in 1m17s
Bin2CPP / Build & Test Release with ./ConanProfiles/clangd_asan (Unity Build: ON) (push) Successful in 1m22s
Bin2CPP / Clang Format Checks (push) Successful in 9s
Bin2CPP / Build & Test Release with ./ConanProfiles/clang (Unity Build: ON) (push) Successful in 1m8s
Conan Packaging / Package Bin2CPP/1.0.0 (push) Successful in 1m14s
Bin2CPP / Sonarqube (push) Successful in 1m42s
Reviewed-on: #4 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 #4.
This commit is contained in:
@@ -32,7 +32,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
conan install . --remote=bigfootpackages -pr:h=${{ matrix.conan_profile }} -pr:b=${{ matrix.conan_profile }} --build=missing -s build_type=${{ matrix.build_type }}
|
conan install . --remote=bigfootpackages -pr:h=${{ matrix.conan_profile }} -pr:b=${{ matrix.conan_profile }} --build=missing -s build_type=${{ matrix.build_type }} -o bin2cpp/*:build_tests=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 -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)
|
cmake --build build/${{ matrix.build_type }} --parallel $(nproc)
|
||||||
|
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ bool Generator::ComputeMappings()
|
|||||||
bool Generator::ComputeFilename()
|
bool Generator::ComputeFilename()
|
||||||
{
|
{
|
||||||
std::filesystem::path file {m_inputFile.data()};
|
std::filesystem::path file {m_inputFile.data()};
|
||||||
m_mappingTable[magic_enum::enum_index(MappingKey::FILENAME).value()] = file.filename().string().c_str();
|
m_mappingTable[magic_enum::enum_index(MappingKey::FILENAME).value()] = file.filename().string();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,20 +61,26 @@ class Log
|
|||||||
|
|
||||||
#define BIN2CPP_LOG_DEBUG(fmt, ...) \
|
#define BIN2CPP_LOG_DEBUG(fmt, ...) \
|
||||||
do \
|
do \
|
||||||
|
{ \
|
||||||
|
if (Bin2CPP::Singleton<Bin2CPP::Log>::HasInstance()) \
|
||||||
{ \
|
{ \
|
||||||
if (quill::Logger* logger = Bin2CPP::Singleton<Bin2CPP::Log>::Instance().GetLogger()) \
|
if (quill::Logger* logger = Bin2CPP::Singleton<Bin2CPP::Log>::Instance().GetLogger()) \
|
||||||
{ \
|
{ \
|
||||||
QUILL_LOG_DEBUG(logger, fmt __VA_OPT__(, ) __VA_ARGS__); \
|
QUILL_LOG_DEBUG(logger, fmt __VA_OPT__(, ) __VA_ARGS__); \
|
||||||
} \
|
} \
|
||||||
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define BIN2CPP_LOG_TRACE(fmt, ...) \
|
#define BIN2CPP_LOG_TRACE(fmt, ...) \
|
||||||
do \
|
do \
|
||||||
|
{ \
|
||||||
|
if (Bin2CPP::Singleton<Bin2CPP::Log>::HasInstance()) \
|
||||||
{ \
|
{ \
|
||||||
if (quill::Logger* logger = Bin2CPP::Singleton<Bin2CPP::Log>::Instance().GetLogger()) \
|
if (quill::Logger* logger = Bin2CPP::Singleton<Bin2CPP::Log>::Instance().GetLogger()) \
|
||||||
{ \
|
{ \
|
||||||
QUILL_LOG_TRACE_L3(logger, fmt __VA_OPT__(, ) __VA_ARGS__); \
|
QUILL_LOG_TRACE_L3(logger, fmt __VA_OPT__(, ) __VA_ARGS__); \
|
||||||
} \
|
} \
|
||||||
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define BIN2CPP_LOG_INFO(fmt, ...) \
|
#define BIN2CPP_LOG_INFO(fmt, ...) \
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ void Log::Flush()
|
|||||||
|
|
||||||
Log::~Log()
|
Log::~Log()
|
||||||
{
|
{
|
||||||
|
Flush();
|
||||||
|
|
||||||
for (quill::Logger* logger: quill::Frontend::get_all_loggers())
|
for (quill::Logger* logger: quill::Frontend::get_all_loggers())
|
||||||
{
|
{
|
||||||
quill::Frontend::remove_logger(logger);
|
quill::Frontend::remove_logger(logger);
|
||||||
|
|||||||
@@ -39,9 +39,7 @@ TEST_F(GeneratorFixture, GenerateDefault)
|
|||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
inline constexpr std::array<std::byte, 11> g_toto_txt = {
|
inline constexpr std::array<std::byte, 11> g_toto_txt = {
|
||||||
std::byte{0x48}, std::byte{0x65}, std::byte{0x6C}, std::byte{0x6C}, std::byte{0x6F},
|
std::byte{0x48}, std::byte{0x65}, std::byte{0x6C}, std::byte{0x6C}, std::byte{0x6F}, std::byte{0x20}, std::byte{0x57}, std::byte{0x6F}, std::byte{0x72}, std::byte{0x6C}, std::byte{0x64}
|
||||||
std::byte{0x20}, std::byte{0x57}, std::byte{0x6F}, std::byte{0x72}, std::byte{0x6C},
|
|
||||||
std::byte{0x64}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
@@ -73,9 +71,7 @@ TEST_F(GeneratorFixture, GenerateNamespace)
|
|||||||
namespace Test
|
namespace Test
|
||||||
{
|
{
|
||||||
inline constexpr std::array<std::byte, 11> g_toto_txt = {
|
inline constexpr std::array<std::byte, 11> g_toto_txt = {
|
||||||
std::byte{0x48}, std::byte{0x65}, std::byte{0x6C}, std::byte{0x6C}, std::byte{0x6F},
|
std::byte{0x48}, std::byte{0x65}, std::byte{0x6C}, std::byte{0x6C}, std::byte{0x6F}, std::byte{0x20}, std::byte{0x57}, std::byte{0x6F}, std::byte{0x72}, std::byte{0x6C}, std::byte{0x64}
|
||||||
std::byte{0x20}, std::byte{0x57}, std::byte{0x6F}, std::byte{0x72}, std::byte{0x6C},
|
|
||||||
std::byte{0x64}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Test
|
} // namespace Test
|
||||||
@@ -109,9 +105,7 @@ TEST_F(GeneratorFixture, GenerateCustomArray)
|
|||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
inline constexpr eastl::array<std::byte, 11> g_myArray = {
|
inline constexpr eastl::array<std::byte, 11> g_myArray = {
|
||||||
std::byte{0x48}, std::byte{0x65}, std::byte{0x6C}, std::byte{0x6C}, std::byte{0x6F},
|
std::byte{0x48}, std::byte{0x65}, std::byte{0x6C}, std::byte{0x6C}, std::byte{0x6F}, std::byte{0x20}, std::byte{0x57}, std::byte{0x6F}, std::byte{0x72}, std::byte{0x6C}, std::byte{0x64}
|
||||||
std::byte{0x20}, std::byte{0x57}, std::byte{0x6F}, std::byte{0x72}, std::byte{0x6C},
|
|
||||||
std::byte{0x64}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
cmake_minimum_required(VERSION 3.26)
|
cmake_minimum_required(VERSION 3.26)
|
||||||
|
|
||||||
project(Bin2CPP VERSION 0.1.0
|
project(Bin2CPP VERSION 1.0.0
|
||||||
DESCRIPTION "Bin2CPP"
|
DESCRIPTION "Bin2CPP"
|
||||||
LANGUAGES CXX)
|
LANGUAGES CXX)
|
||||||
|
|
||||||
|
|||||||
@@ -29,4 +29,4 @@ tools.cmake.cmaketoolchain:generator=Ninja
|
|||||||
!cmake/*: cmake/[>=4.2]
|
!cmake/*: cmake/[>=4.2]
|
||||||
|
|
||||||
[options]
|
[options]
|
||||||
Bin2CPP/*:build_tests=True
|
bin2cpp/*:build_tests=True
|
||||||
|
|||||||
@@ -26,5 +26,5 @@ tools.build:compiler_executables={"c": "clang", "cpp": "clang++"}
|
|||||||
!cmake/*: cmake/[>=4.2]
|
!cmake/*: cmake/[>=4.2]
|
||||||
|
|
||||||
[options]
|
[options]
|
||||||
Bin2CPP/*:build_tests=True
|
bin2cpp/*:build_tests=True
|
||||||
Bin2CPP/*:coverage=True
|
bin2cpp/*:coverage=True
|
||||||
|
|||||||
@@ -26,4 +26,4 @@ tools.build:compiler_executables={"c": "clang", "cpp": "clang++"}
|
|||||||
!cmake/*: cmake/[>=4.2]
|
!cmake/*: cmake/[>=4.2]
|
||||||
|
|
||||||
[options]
|
[options]
|
||||||
Bin2CPP/*:build_tests=True
|
bin2cpp/*:build_tests=True
|
||||||
|
|||||||
@@ -29,5 +29,5 @@ tools.build:compiler_executables={"c": "clang", "cpp": "clang++"}
|
|||||||
!cmake/*: cmake/[>=4.2]
|
!cmake/*: cmake/[>=4.2]
|
||||||
|
|
||||||
[options]
|
[options]
|
||||||
Bin2CPP/*:asan=True
|
bin2cpp/*:asan=True
|
||||||
Bin2CPP/*:build_tests=True
|
bin2cpp/*:build_tests=True
|
||||||
|
|||||||
@@ -21,4 +21,4 @@ tools.build:cxxflags=["/Zc:preprocessor", "/permissive-", "/Zc:__cplusplus", "/Z
|
|||||||
!cmake/*: cmake/[>=4.2]
|
!cmake/*: cmake/[>=4.2]
|
||||||
|
|
||||||
[options]
|
[options]
|
||||||
Bin2CPP/*:build_tests=True
|
bin2cpp/*:build_tests=True
|
||||||
|
|||||||
@@ -17,4 +17,4 @@ tools.build:cxxflags=["/Zc:preprocessor", "/permissive-", "/Zc:__cplusplus", "/Z
|
|||||||
!cmake/*: cmake/[>=4.2]
|
!cmake/*: cmake/[>=4.2]
|
||||||
|
|
||||||
[options]
|
[options]
|
||||||
Bin2CPP/*:build_tests=True
|
bin2cpp/*:build_tests=True
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/msvc_ccache.cmake
|
|||||||
tools.build:exelinkflags=["/INCREMENTAL:NO"]
|
tools.build:exelinkflags=["/INCREMENTAL:NO"]
|
||||||
tools.build:sharedlinkflags=["/INCREMENTAL:NO"]
|
tools.build:sharedlinkflags=["/INCREMENTAL:NO"]
|
||||||
|
|
||||||
tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/D_CRT_DECLARE_NONSTDC_NAMES=1"]
|
tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/D_CRT_DECLARE_NONSTDC_NAMES=1", "/fsanitize=address"]
|
||||||
tools.build:cxxflags=["/Zc:preprocessor", "/permissive-", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope", "/Zc:throwingNew"]
|
tools.build:cxxflags=["/Zc:preprocessor", "/permissive-", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope", "/Zc:throwingNew", "/fsanitize=address"]
|
||||||
|
|
||||||
[tool_requires]
|
[tool_requires]
|
||||||
!cmake/*: cmake/[>=4.2]
|
!cmake/*: cmake/[>=4.2]
|
||||||
|
|
||||||
[options]
|
[options]
|
||||||
Bin2CPP/*:asan=True
|
bin2cpp/*:asan=True
|
||||||
Bin2CPP/*:build_tests=True
|
bin2cpp/*:build_tests=True
|
||||||
|
|||||||
Reference in New Issue
Block a user