Initial commit
Some checks failed
Bigfoot / Build & Test Debug (push) Successful in 1m21s
Bigfoot / Build & Test RelWithDebInfo (push) Successful in 1m0s
Bigfoot / Build & Test Release (push) Successful in 31s
Bigfoot / Clang Format Checks (push) Failing after 8s
Bigfoot / Sonarqube (push) Successful in 52s
Some checks failed
Bigfoot / Build & Test Debug (push) Successful in 1m21s
Bigfoot / Build & Test RelWithDebInfo (push) Successful in 1m0s
Bigfoot / Build & Test Release (push) Successful in 31s
Bigfoot / Clang Format Checks (push) Failing after 8s
Bigfoot / Sonarqube (push) Successful in 52s
This commit is contained in:
122
.clang-format
Normal file
122
.clang-format
Normal file
@@ -0,0 +1,122 @@
|
||||
---
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignArrayOfStructures: None
|
||||
AccessModifierOffset: -2
|
||||
AlignConsecutiveBitFields:
|
||||
Enabled: true
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: true
|
||||
AlignCompound: true
|
||||
PadOperators: true
|
||||
AlignConsecutiveMacros:
|
||||
Enabled: true
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: true
|
||||
AlignCompound: true
|
||||
PadOperators: true
|
||||
AlignConsecutiveShortCaseStatements:
|
||||
Enabled: true
|
||||
AcrossEmptyLines: true
|
||||
AcrossComments: true
|
||||
AlignCaseColons: true
|
||||
AlignEscapedNewlines: Right
|
||||
AlignOperands: Align
|
||||
AlignTrailingComments:
|
||||
Kind: Always
|
||||
OverEmptyLines: 2
|
||||
AllowAllArgumentsOnNextLine: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowShortBlocksOnASingleLine: Empty
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortEnumsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: Empty
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLambdasOnASingleLine: Empty
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
AlwaysBreakTemplateDeclarations: Yes
|
||||
BinPackArguments: false
|
||||
BinPackParameters: false
|
||||
BitFieldColonSpacing: After
|
||||
BreakBeforeBraces: Custom
|
||||
BracedInitializerIndentWidth: 2
|
||||
BreakAfterAttributes: Always
|
||||
BreakArrays: false
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializers: AfterColon
|
||||
BreakInheritanceList: BeforeComma
|
||||
BreakStringLiterals: true
|
||||
CompactNamespaces: false
|
||||
Cpp11BracedListStyle: true
|
||||
EmptyLineBeforeAccessModifier: Always
|
||||
FixNamespaceComments: true
|
||||
IncludeBlocks: Preserve
|
||||
IndentCaseBlocks: true
|
||||
IndentCaseLabels: false
|
||||
IndentPPDirectives: None
|
||||
IndentRequiresClause: true
|
||||
IndentWidth: 4
|
||||
IndentWrappedFunctionNames: true
|
||||
InsertBraces: true
|
||||
InsertNewlineAtEOF: true
|
||||
IntegerLiteralSeparator:
|
||||
Binary: -1
|
||||
Decimal: 3
|
||||
DecimalMinDigits: 5
|
||||
Hex: -1
|
||||
LambdaBodyIndentation: Signature
|
||||
Language: Cpp
|
||||
NamespaceIndentation: None
|
||||
PointerAlignment: Left
|
||||
QualifierAlignment: Leave
|
||||
ReferenceAlignment: Left
|
||||
UseTab: Never
|
||||
Standard: Auto
|
||||
BraceWrapping:
|
||||
AfterNamespace: true
|
||||
AfterCaseLabel: true
|
||||
AfterClass: true
|
||||
AfterControlStatement: Always
|
||||
AfterEnum: true
|
||||
AfterFunction: true
|
||||
AfterStruct: true
|
||||
AfterUnion: true
|
||||
BeforeElse: true
|
||||
BeforeLambdaBody: true
|
||||
BeforeWhile: false
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: true
|
||||
SplitEmptyRecord: true
|
||||
SplitEmptyNamespace: true
|
||||
ColumnLimit: 120
|
||||
SpaceAfterTemplateKeyword: false
|
||||
SortIncludes: CaseSensitive
|
||||
PenaltyReturnTypeOnItsOwnLine: 500
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCaseColon: false
|
||||
SpaceBeforeCtorInitializerColon: false
|
||||
SpaceBeforeInheritanceColon: false
|
||||
SpaceBeforeRangeBasedForLoopColon: false
|
||||
SpaceBeforeSquareBrackets: false
|
||||
SpacesInAngles: Never
|
||||
SpacesInConditionalStatement: false
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpacesInContainerLiterals: false
|
||||
SpacesInSquareBrackets: false
|
||||
SpacesBeforeTrailingComments: 3
|
||||
PackConstructorInitializers: Never
|
||||
SeparateDefinitionBlocks: Always
|
||||
MaxEmptyLinesToKeep: 1
|
||||
BreakBeforeBinaryOperators: None
|
||||
AlignConsecutiveAssignments:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: true
|
||||
AlignCompound: true
|
||||
PadOperators: true
|
||||
SpaceAroundPointerQualifiers: Default
|
||||
SpaceBeforeCpp11BracedList: true
|
||||
SpaceInEmptyBlock: true
|
||||
PenaltyBreakAssignment: 200
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
22
.clang-tidy
Normal file
22
.clang-tidy
Normal file
@@ -0,0 +1,22 @@
|
||||
# .clang-tidy
|
||||
---
|
||||
Checks: >
|
||||
-*,
|
||||
bugprone-*,
|
||||
clang-analyzer-*,
|
||||
cppcoreguidelines-*,
|
||||
modernize-*,
|
||||
performance-*,
|
||||
readability-*,
|
||||
portability-*,
|
||||
|
||||
-modernize-use-trailing-return-type,
|
||||
-readability-avoid-const-params-in-decls,
|
||||
-cppcoreguidelines-macro-usage,
|
||||
-cppcoreguidelines-avoid-do-while
|
||||
|
||||
ExcludeHeaderFilterRegex: '_generated.*'
|
||||
|
||||
CheckOptions:
|
||||
- key: readability-implicit-bool-conversion.AllowPointerConditions
|
||||
value: true
|
||||
3
.gitattributes
vendored
Normal file
3
.gitattributes
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
* text=auto eol=lf
|
||||
*.{cmd,[cC][mM][dD]} text eol=crlf
|
||||
*.{bat,[bB][aA][tT]} text eol=crlf
|
||||
65
.gitea/workflows/ci.yml
Normal file
65
.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,65 @@
|
||||
name: Bigfoot
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
CCACHE_BASEDIR: ${{ github.workspace }}
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 120
|
||||
container:
|
||||
image: git.romainboullard.com/bigfootdev/linuxcppbuilder:main
|
||||
strategy:
|
||||
matrix:
|
||||
build_type: ["Debug", "RelWithDebInfo", "Release"]
|
||||
name: "Build & Test ${{ matrix.build_type }}"
|
||||
steps:
|
||||
- name: Install Node.js
|
||||
run: apt-get update && apt-get install -y nodejs
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Show ccache stats before
|
||||
run: ccache --zero-stats
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
conan profile detect
|
||||
conan install . --deployer=full_deploy --deployer-folder=build --remote=bigfootpackages --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 }} -G "Ninja"
|
||||
cmake --build build/${{ matrix.build_type }} --parallel $(nproc)
|
||||
|
||||
- name: Show ccache stats after
|
||||
run: ccache --show-stats
|
||||
|
||||
- name: Unit Tests
|
||||
run: |
|
||||
cd ./build/${{ matrix.build_type }}
|
||||
ctest . --output-on-failure
|
||||
|
||||
clang-format:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 120
|
||||
container:
|
||||
image: git.romainboullard.com/bigfootdev/linuxcppbuilder:main
|
||||
name: "Clang Format Checks"
|
||||
steps:
|
||||
- name: Install Node.js
|
||||
run: apt-get update && apt-get install -y nodejs
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Clang Format Checks
|
||||
run: chmod +x format.sh && ./format.sh --check Bigfoot
|
||||
48
.gitea/workflows/sonarqube.yml
Normal file
48
.gitea/workflows/sonarqube.yml
Normal file
@@ -0,0 +1,48 @@
|
||||
name: Bigfoot
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- Development
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 120
|
||||
container:
|
||||
image: git.romainboullard.com/bigfootdev/linuxcppbuilder:main
|
||||
name: "Sonarqube"
|
||||
steps:
|
||||
- name: Install Node.js
|
||||
run: apt-get update && apt-get install -y nodejs
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Generate
|
||||
run: |
|
||||
conan profile detect
|
||||
conan install . --deployer=full_deploy --deployer-folder=build --remote=bigfootpackages --build=missing -s build_type=Debug -o bin2cpp/*:build_tests=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)
|
||||
|
||||
- name: Clang-Tidy
|
||||
run: run-clang-tidy -p ./build/Debug/ >> tidy_result.txt
|
||||
|
||||
- name: Infer
|
||||
run: infer run --compilation-database build/Debug/compile_commands.json
|
||||
|
||||
- name: SonarQube Scan
|
||||
if: github.head_ref == 'main' || github.ref_name == 'main'
|
||||
uses: SonarSource/sonarqube-scan-action@v7.0.0
|
||||
with:
|
||||
args: >
|
||||
-Dsonar.cxx.jsonCompilationDatabase=./build/Debug/compile_commands.json
|
||||
-Dsonar.verbose=true
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
SONAR_HOST_URL: ${{ secrets.SONAR_HOST }}
|
||||
21
.gitignore
vendored
Normal file
21
.gitignore
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
[Bb]uild*
|
||||
Environment/output
|
||||
*.generated.h
|
||||
|
||||
.scannerwork
|
||||
|
||||
SonarqubeResult
|
||||
*.profraw
|
||||
|
||||
conan_imports_manifest.txt
|
||||
CMakeUserPresets.json
|
||||
conan.lock
|
||||
conanbuildinfo.txt
|
||||
conaninfo.txt
|
||||
graph_info.json
|
||||
|
||||
.idea
|
||||
|
||||
test_package/Vendor
|
||||
|
||||
graphviz
|
||||
3
.inferconfig
Normal file
3
.inferconfig
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
|
||||
}
|
||||
29
Bin2CPP/Sources/Bin2CPPExe/CMakeLists.txt
Normal file
29
Bin2CPP/Sources/Bin2CPPExe/CMakeLists.txt
Normal file
@@ -0,0 +1,29 @@
|
||||
get_filename_component(PackageName ${CMAKE_CURRENT_SOURCE_DIR} NAME)
|
||||
project(${PackageName})
|
||||
|
||||
add_executable(${PROJECT_NAME})
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX)
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/Include)
|
||||
|
||||
# collect sources (reconfigure when files are added/removed)
|
||||
file(GLOB_RECURSE SOURCES
|
||||
CONFIGURE_DEPENDS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/*.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/*.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
|
||||
)
|
||||
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC CLI11::CLI11 Bin2CPPLib)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE ${CMAKE_DL_LIBS})
|
||||
|
||||
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX Src FILES ${SOURCES})
|
||||
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER Bin2CPP/${ParentFolder})
|
||||
|
||||
bin2cpp_setup_dependencies("Bin2CPPExe")
|
||||
4
Bin2CPP/Sources/Bin2CPPExe/main.cpp
Normal file
4
Bin2CPP/Sources/Bin2CPPExe/main.cpp
Normal file
@@ -0,0 +1,4 @@
|
||||
int main([[maybe_unused]] int argc, [[maybe_unused]] char** argv)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
28
Bin2CPP/Sources/Bin2CPPLib/CMakeLists.txt
Normal file
28
Bin2CPP/Sources/Bin2CPPLib/CMakeLists.txt
Normal file
@@ -0,0 +1,28 @@
|
||||
get_filename_component(PackageName ${CMAKE_CURRENT_SOURCE_DIR} NAME)
|
||||
project(${PackageName})
|
||||
|
||||
add_library(${PROJECT_NAME} STATIC)
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX)
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/Include)
|
||||
|
||||
# collect sources (reconfigure when files are added/removed)
|
||||
file(GLOB_RECURSE SOURCES
|
||||
CONFIGURE_DEPENDS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/*.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/*.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
|
||||
)
|
||||
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC EASTL::EASTL rapidhash::rapidhash mimalloc)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE ${CMAKE_DL_LIBS})
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE $<$<CONFIG:Debug,RelWithDebInfo>:cpptrace::cpptrace> quill::quill)
|
||||
|
||||
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX Src FILES ${SOURCES})
|
||||
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER Bin2CPP/${ParentFolder})
|
||||
0
Bin2CPP/Sources/Bin2CPPLib/touch.cpp
Normal file
0
Bin2CPP/Sources/Bin2CPPLib/touch.cpp
Normal file
2
Bin2CPP/Sources/CMakeLists.txt
Normal file
2
Bin2CPP/Sources/CMakeLists.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Bin2CPPLib)
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Bin2CPPExe)
|
||||
53
Bin2CPP/Tests/Bin2CPPLib/CMakeLists.txt
Normal file
53
Bin2CPP/Tests/Bin2CPPLib/CMakeLists.txt
Normal file
@@ -0,0 +1,53 @@
|
||||
get_filename_component(PackageName ${CMAKE_CURRENT_SOURCE_DIR} NAME)
|
||||
project(${PackageName}Tests)
|
||||
|
||||
add_executable(${PROJECT_NAME})
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX)
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/Include)
|
||||
|
||||
file(GLOB_RECURSE TEST_SOURCES
|
||||
CONFIGURE_DEPENDS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/*.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/*.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
|
||||
)
|
||||
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
${TEST_SOURCES}
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE gtest::gtest Bin2CPPLib)
|
||||
|
||||
include(GoogleTest)
|
||||
gtest_discover_tests(${PROJECT_NAME} XML_OUTPUT_DIR ${CMAKE_BINARY_DIR}/TestResults/)
|
||||
|
||||
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX Src/ FILES ${TEST_SOURCES})
|
||||
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER Tests/Bin2CPP/${ParentFolder})
|
||||
|
||||
##################COPY FIXTURE FOLDER###################
|
||||
|
||||
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Fixture)
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Fixture)
|
||||
endif()
|
||||
|
||||
# Track all fixture files
|
||||
file(GLOB_RECURSE FIXTURE_FILES
|
||||
CONFIGURE_DEPENDS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Fixture/*
|
||||
)
|
||||
|
||||
add_custom_target(${PROJECT_NAME}Fixture
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory $<TARGET_FILE_DIR:${PROJECT_NAME}>/Fixture
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/Fixture $<TARGET_FILE_DIR:${PROJECT_NAME}>/Fixture
|
||||
DEPENDS ${FIXTURE_FILES}
|
||||
COMMENT "Copying Fixture folder for ${PROJECT_NAME}"
|
||||
)
|
||||
|
||||
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}Fixture)
|
||||
|
||||
set_target_properties(${PROJECT_NAME}Fixture PROPERTIES FOLDER UtilityTargets/Tests/Bin2CPP/${ParentFolder})
|
||||
|
||||
bin2cpp_setup_dependencies("Tests/Bin2CPP")
|
||||
0
Bin2CPP/Tests/Bin2CPPLib/Fixture/toto.txt
Normal file
0
Bin2CPP/Tests/Bin2CPPLib/Fixture/toto.txt
Normal file
0
Bin2CPP/Tests/Bin2CPPLib/touch.cpp
Normal file
0
Bin2CPP/Tests/Bin2CPPLib/touch.cpp
Normal file
1
Bin2CPP/Tests/CMakeLists.txt
Normal file
1
Bin2CPP/Tests/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Bin2CPPLib)
|
||||
22
CMake/FindDependencies.cmake
Normal file
22
CMake/FindDependencies.cmake
Normal file
@@ -0,0 +1,22 @@
|
||||
find_package(Python3 COMPONENTS Interpreter Development)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
find_package(Threads REQUIRED)
|
||||
endif()
|
||||
|
||||
find_package(EASTL REQUIRED)
|
||||
find_package(mimalloc REQUIRED)
|
||||
find_package(CLI11 REQUIRED)
|
||||
find_package(rapidhash REQUIRED)
|
||||
find_package(quill REQUIRED)
|
||||
|
||||
if(${IS_MULTI_CONFIG})
|
||||
find_package(cpptrace REQUIRED)
|
||||
elseif(${CMAKE_BUILD_TYPE} STREQUAL "Debug" OR ${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
|
||||
find_package(cpptrace REQUIRED)
|
||||
endif()
|
||||
|
||||
if(BUILD_TESTS)
|
||||
find_package(GTest REQUIRED)
|
||||
endif()
|
||||
58
CMake/Utils.cmake
Normal file
58
CMake/Utils.cmake
Normal file
@@ -0,0 +1,58 @@
|
||||
function(bin2cpp_setup_dependencies ParentFolder)
|
||||
set(CONAN_DEPLOYER_DIR "${CMAKE_SOURCE_DIR}/build/full_deploy/host")
|
||||
|
||||
if(EXISTS ${CONAN_DEPLOYER_DIR})
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
file(GLOB_RECURSE SHARED_BINARIES ${CONAN_DEPLOYER_DIR}/*mimalloc*.dll)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
file(GLOB_RECURSE SHARED_BINARIES ${CONAN_DEPLOYER_DIR}/*mimalloc*.so*)
|
||||
endif()
|
||||
|
||||
if(${IS_MULTI_CONFIG})
|
||||
foreach(CONFIG ${CMAKE_CONFIGURATION_TYPES})
|
||||
foreach(file ${SHARED_BINARIES})
|
||||
if(file MATCHES "/${CONFIG}/")
|
||||
list(APPEND SHARED_BINARIES_${CONFIG} ${file})
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
add_custom_target(${PROJECT_NAME}CopySharedBinaries
|
||||
ALL DEPENDS SHARED_BINARIES
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${PROJECT_NAME}>
|
||||
COMMAND ${CMAKE_COMMAND} -E $<IF:$<CONFIG:Debug>,copy_if_different,true> ${SHARED_BINARIES_Debug} $<TARGET_FILE_DIR:${PROJECT_NAME}>
|
||||
COMMAND ${CMAKE_COMMAND} -E $<IF:$<CONFIG:Release>,copy_if_different,true> ${SHARED_BINARIES_Release} $<TARGET_FILE_DIR:${PROJECT_NAME}>
|
||||
COMMAND ${CMAKE_COMMAND} -E $<IF:$<CONFIG:RelWithDebInfo>,copy_if_different,true> ${SHARED_BINARIES_RelWithDebInfo} $<TARGET_FILE_DIR:${PROJECT_NAME}>
|
||||
COMMENT "Copy shared binaries for ${PROJECT_NAME}"
|
||||
)
|
||||
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}CopySharedBinaries)
|
||||
set_target_properties(${PROJECT_NAME}CopySharedBinaries PROPERTIES FOLDER UtilityTargets/${ParentFolder})
|
||||
|
||||
else()
|
||||
foreach(file ${SHARED_BINARIES})
|
||||
if(file MATCHES "/${CMAKE_BUILD_TYPE}/")
|
||||
list(APPEND SHARED_BINARIES_${CMAKE_BUILD_TYPE} ${file})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
add_custom_target(${PROJECT_NAME}CopySharedBinaries ALL
|
||||
DEPENDS ${SHARED_BINARIES_${CMAKE_BUILD_TYPE}}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory $<TARGET_FILE_DIR:${PROJECT_NAME}>
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SHARED_BINARIES_${CMAKE_BUILD_TYPE}} $<TARGET_FILE_DIR:${PROJECT_NAME}>
|
||||
COMMENT "Copy shared binaries for ${PROJECT_NAME}"
|
||||
)
|
||||
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}CopySharedBinaries)
|
||||
set_target_properties(${PROJECT_NAME}CopySharedBinaries PROPERTIES FOLDER UtilityTargets/${ParentFolder})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
add_custom_target(${PROJECT_NAME}PatchMinject ALL
|
||||
COMMAND ${MINJECT_EXECUTABLE} -i -f $<TARGET_FILE:${PROJECT_NAME}>
|
||||
COMMENT "Patching ${PROJECT_NAME} to ensure mimalloc dynamic override"
|
||||
)
|
||||
add_dependencies(${PROJECT_NAME}PatchMinject ${PROJECT_NAME})
|
||||
set_target_properties(${PROJECT_NAME}PatchMinject PROPERTIES FOLDER "UtilityTargets/${ParentFolder}")
|
||||
endif()
|
||||
|
||||
endfunction()
|
||||
45
CMakeLists.txt
Normal file
45
CMakeLists.txt
Normal file
@@ -0,0 +1,45 @@
|
||||
cmake_minimum_required(VERSION 3.24)
|
||||
|
||||
project(Bin2CPP VERSION 0.1.0
|
||||
DESCRIPTION "Bin2CPP"
|
||||
LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
|
||||
|
||||
get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||
set(CMAKE_CONFIGURATION_TYPES "Release;RelWithDebInfo;Debug" CACHE STRING "" FORCE)
|
||||
|
||||
option(BUILD_TESTS OFF)
|
||||
|
||||
include(${CMAKE_SOURCE_DIR}/CMake/FindDependencies.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/CMake/Utils.cmake)
|
||||
|
||||
find_program(MINJECT_EXECUTABLE NAMES minject)
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
set(CMAKE_OPTIMIZE_DEPENDENCIES 1)
|
||||
|
||||
add_compile_definitions(
|
||||
$<$<PLATFORM_ID:Windows>:NOMINMAX>
|
||||
$<$<PLATFORM_ID:Windows>:WIN32_LEAN_AND_MEAN>)
|
||||
|
||||
if(BUILD_TESTS)
|
||||
enable_testing()
|
||||
endif()
|
||||
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
||||
SET(CMAKE_INSTALL_RPATH "\${ORIGIN}")
|
||||
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Bin2CPP/Sources)
|
||||
if(${BUILD_TESTS})
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/Bin2CPP/Tests)
|
||||
endif()
|
||||
|
||||
add_custom_target(NatVis SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Vendor/NatVis/EASTL/EASTL.natvis)
|
||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022-2026 Romain BOULLARD
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
761
Vendor/NatVis/EASTL/EASTL.natvis
vendored
Normal file
761
Vendor/NatVis/EASTL/EASTL.natvis
vendored
Normal file
@@ -0,0 +1,761 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
This is a Microsoft natvis file, which allows visualization of complex variables in the
|
||||
Microsoft debugger starting with VS2012. It's a successor to the AutoExp.dat file format.
|
||||
|
||||
This file needs to go into your C:\Users\<user>\Documents\Visual Studio 2011\Visualizers\
|
||||
folder. Microsoft documentation states that it should go into a 2012 folder, but testing
|
||||
in June of 2013 suggests that it still needs to be the 2011 folder.
|
||||
|
||||
You don't need to restart Visual Studio to use it, you just need to restart the debug
|
||||
session. You can have multiple .natvis files and they will all be used.
|
||||
|
||||
VS2017 natvis documentation:
|
||||
https://docs.microsoft.com/en-us/visualstudio/debugger/create-custom-views-of-native-objects
|
||||
-->
|
||||
|
||||
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
|
||||
|
||||
<Type Name="eastl::unique_ptr<*>">
|
||||
<DisplayString Condition="mPair.mFirst != nullptr">({(void*)mPair.mFirst} = {*mPair.mFirst})</DisplayString>
|
||||
<DisplayString Condition="mPair.mFirst == nullptr">({nullptr})</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[pointer]">(void*)mPair.mFirst</Item>
|
||||
<Item Name="[value]">*mPair.mFirst</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::shared_ptr<*>">
|
||||
<DisplayString Condition="mpValue != nullptr">({(void*)mpValue} = {*mpValue})</DisplayString>
|
||||
<DisplayString Condition="mpValue == nullptr">({nullptr})</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[pointer]">(void*)mpValue</Item>
|
||||
<Item Name="[value]">*mpValue</Item>
|
||||
<Item Name="[reference count]">mpRefCount->mRefCount</Item>
|
||||
<Item Name="[weak reference count]">mpRefCount->mWeakRefCount</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::weak_ptr<*>">
|
||||
<DisplayString>{((mpRefCount && mpRefCount->mRefCount) ? mpValue : nullptr)}</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem>mpRefCount && mpRefCount->mRefCount ? mpValue : nullptr</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::array<*,*>">
|
||||
<DisplayString Condition="$T2 == 0">[{$T2}] {{}}</DisplayString>
|
||||
<DisplayString Condition="$T2 == 1">[{$T2}] {{ {*mValue} }}</DisplayString>
|
||||
<DisplayString Condition="$T2 == 2">[{$T2}] {{ {*mValue}, {*(mValue+1)} }}</DisplayString>
|
||||
<DisplayString Condition="$T2 == 3">[{$T2}] {{ {*mValue}, {*(mValue+1)}, {*(mValue+2)} }}</DisplayString>
|
||||
<DisplayString Condition="$T2 == 4">[{$T2}] {{ {*mValue}, {*(mValue+1)}, {*(mValue+2)}, {*(mValue+3)} }}</DisplayString>
|
||||
<DisplayString Condition="$T2 == 5">[{$T2}] {{ {*mValue}, {*(mValue+1)}, {*(mValue+2)}, {*(mValue+3)}, {*(mValue+4)} }}</DisplayString>
|
||||
<DisplayString Condition="$T2 == 6">[{$T2}] {{ {*mValue}, {*(mValue+1)}, {*(mValue+2)}, {*(mValue+3)}, {*(mValue+4)}, {*(mValue+5)} }}</DisplayString>
|
||||
<DisplayString Condition="$T2 > 6">[{$T2}] {{ {*mValue}, {*(mValue+1)}, {*(mValue+2)}, {*(mValue+3)}, {*(mValue+4)}, {*(mValue+5)}, ... }}</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[size]">$T2</Item>
|
||||
<ArrayItems>
|
||||
<Size>$T2</Size>
|
||||
<ValuePointer>mValue</ValuePointer>
|
||||
</ArrayItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::basic_string<*>">
|
||||
<DisplayString Condition="!!(mPair.mFirst.sso.mRemainingSizeField.mnRemainingSize & kSSOMask)">"{mPair.mFirst.heap.mpBegin,sb}"</DisplayString>
|
||||
<DisplayString Condition="!(mPair.mFirst.sso.mRemainingSizeField.mnRemainingSize & kSSOMask)">"{mPair.mFirst.sso.mData,sb}"</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[length]" Condition="!!(mPair.mFirst.sso.mRemainingSizeField.mnRemainingSize & kSSOMask)">mPair.mFirst.heap.mnSize</Item>
|
||||
<Item Name="[capacity]" Condition="!!(mPair.mFirst.sso.mRemainingSizeField.mnRemainingSize & kSSOMask)">(mPair.mFirst.heap.mnCapacity & ~kHeapMask)</Item>
|
||||
<Item Name="[value]" Condition="!!(mPair.mFirst.sso.mRemainingSizeField.mnRemainingSize & kSSOMask)">mPair.mFirst.heap.mpBegin,sb</Item>
|
||||
|
||||
<Item Name="[length]" Condition="!(mPair.mFirst.sso.mRemainingSizeField.mnRemainingSize & kSSOMask)">(SSOLayout::SSO_CAPACITY - mPair.mFirst.sso.mRemainingSizeField.mnRemainingSize)</Item>
|
||||
<Item Name="[capacity]" Condition="!(mPair.mFirst.sso.mRemainingSizeField.mnRemainingSize & kSSOMask)">SSOLayout::SSO_CAPACITY</Item>
|
||||
<Item Name="[value]" Condition="!(mPair.mFirst.sso.mRemainingSizeField.mnRemainingSize & kSSOMask)">mPair.mFirst.sso.mData,sb</Item>
|
||||
|
||||
<Item Name="[uses heap]">!!(mPair.mFirst.sso.mRemainingSizeField.mnRemainingSize & kSSOMask)</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
|
||||
<Type Name="eastl::basic_string<wchar_t,*>">
|
||||
<DisplayString Condition="!!(mPair.mFirst.sso.mRemainingSizeField.mnRemainingSize & kSSOMask)">{mPair.mFirst.heap.mpBegin,su}</DisplayString>
|
||||
<DisplayString Condition="!(mPair.mFirst.sso.mRemainingSizeField.mnRemainingSize & kSSOMask)">{mPair.mFirst.sso.mData,su}</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[length]" Condition="!!(mPair.mFirst.sso.mRemainingSizeField.mnRemainingSize & kSSOMask)">mPair.mFirst.heap.mnSize</Item>
|
||||
<Item Name="[capacity]" Condition="!!(mPair.mFirst.sso.mRemainingSizeField.mnRemainingSize & kSSOMask)">(mPair.mFirst.heap.mnCapacity & ~kHeapMask)</Item>
|
||||
<Item Name="[value]" Condition="!!(mPair.mFirst.sso.mRemainingSizeField.mnRemainingSize & kSSOMask)">mPair.mFirst.heap.mpBegin,su</Item>
|
||||
|
||||
<Item Name="[length]" Condition="!(mPair.mFirst.sso.mRemainingSizeField.mnRemainingSize & kSSOMask)">(SSOLayout::SSO_CAPACITY - mPair.mFirst.sso.mRemainingSizeField.mnRemainingSize)</Item>
|
||||
<Item Name="[capacity]" Condition="!(mPair.mFirst.sso.mRemainingSizeField.mnRemainingSize & kSSOMask)">SSOLayout::SSO_CAPACITY</Item>
|
||||
<Item Name="[value]" Condition="!(mPair.mFirst.sso.mRemainingSizeField.mnRemainingSize & kSSOMask)">mPair.mFirst.sso.mData,su</Item>
|
||||
|
||||
<Item Name="[uses heap]">!!(mPair.mFirst.sso.mRemainingSizeField.mnRemainingSize & kSSOMask)</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::pair<*>">
|
||||
<DisplayString>({first}, {second})</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="first">first</Item>
|
||||
<Item Name="second">second</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::span<*>">
|
||||
<DisplayString Condition="mnSize == 0">[{mnSize}] {{}}</DisplayString>
|
||||
<DisplayString Condition="mnSize == 1">[{mnSize}] {{ {*mpData} }}</DisplayString>
|
||||
<DisplayString Condition="mnSize == 2">[{mnSize}] {{ {*mpData}, {*(mpData+1)} }}</DisplayString>
|
||||
<DisplayString Condition="mnSize == 3">[{mnSize}] {{ {*mpData}, {*(mpData+1)}, {*(mpData+2)} }}</DisplayString>
|
||||
<DisplayString Condition="mnSize == 4">[{mnSize}] {{ {*mpData}, {*(mpData+1)}, {*(mpData+2)}, {*(mpData+3)} }}</DisplayString>
|
||||
<DisplayString Condition="mnSize == 5">[{mnSize}] {{ {*mpData}, {*(mpData+1)}, {*(mpData+2)}, {*(mpData+3)}, {*(mpData+4)} }}</DisplayString>
|
||||
<DisplayString Condition="mnSize == 6">[{mnSize}] {{ {*mpData}, {*(mpData+1)}, {*(mpData+2)}, {*(mpData+3)}, {*(mpData+4)}, {*(mpData+5)} }}</DisplayString>
|
||||
<DisplayString Condition="mnSize > 6">[{mnSize}] {{ {*mpData}, {*(mpData+1)}, {*(mpData+2)}, {*(mpData+3)}, {*(mpData+4)}, {*(mpData+5)}, ... }}</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[size]">mnSize</Item>
|
||||
<ArrayItems>
|
||||
<Size>mnSize</Size>
|
||||
<ValuePointer>mpData</ValuePointer>
|
||||
</ArrayItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::VectorBase<*>">
|
||||
<DisplayString Condition="mpEnd == mpBegin">[{mpEnd - mpBegin}] {{}}</DisplayString>
|
||||
<DisplayString Condition="mpEnd - mpBegin == 1">[{mpEnd - mpBegin}] {{ {*mpBegin} }}</DisplayString>
|
||||
<DisplayString Condition="mpEnd - mpBegin == 2">[{mpEnd - mpBegin}] {{ {*mpBegin}, {*(mpBegin+1)} }}</DisplayString>
|
||||
<DisplayString Condition="mpEnd - mpBegin == 3">[{mpEnd - mpBegin}] {{ {*mpBegin}, {*(mpBegin+1)}, {*(mpBegin+2)} }}</DisplayString>
|
||||
<DisplayString Condition="mpEnd - mpBegin == 4">[{mpEnd - mpBegin}] {{ {*mpBegin}, {*(mpBegin+1)}, {*(mpBegin+2)}, {*(mpBegin+3)} }}</DisplayString>
|
||||
<DisplayString Condition="mpEnd - mpBegin == 5">[{mpEnd - mpBegin}] {{ {*mpBegin}, {*(mpBegin+1)}, {*(mpBegin+2)}, {*(mpBegin+3)}, {*(mpBegin+4)} }}</DisplayString>
|
||||
<DisplayString Condition="mpEnd - mpBegin == 6">[{mpEnd - mpBegin}] {{ {*mpBegin}, {*(mpBegin+1)}, {*(mpBegin+2)}, {*(mpBegin+3)}, {*(mpBegin+4)}, {*(mpBegin+5)} }}</DisplayString>
|
||||
<DisplayString Condition="mpEnd - mpBegin > 6">[{mpEnd - mpBegin}] {{ {*mpBegin}, {*(mpBegin+1)}, {*(mpBegin+2)}, {*(mpBegin+3)}, {*(mpBegin+4)}, {*(mpBegin+5)}, ... }}</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[size]">mpEnd - mpBegin</Item>
|
||||
<Item Name="[capacity]">mCapacityAllocator.mFirst - mpBegin</Item>
|
||||
<ArrayItems>
|
||||
<Size>mpEnd - mpBegin</Size>
|
||||
<ValuePointer>mpBegin</ValuePointer>
|
||||
</ArrayItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::DequeBase<*,*,*>">
|
||||
<DisplayString Condition="mItBegin.mpCurrent == mItEnd.mpCurrent">
|
||||
[0] {{}}
|
||||
</DisplayString>
|
||||
<DisplayString Condition="(mItEnd.mpCurrentArrayPtr - mItBegin.mpCurrentArrayPtr) * $T3 + (mItEnd.mpCurrent-mItEnd.mpBegin) - (mItBegin.mpCurrent-mItBegin.mpBegin) == 1">
|
||||
[1] {{ {*mItBegin.mpCurrent} }}
|
||||
</DisplayString>
|
||||
<DisplayString Condition="(mItEnd.mpCurrentArrayPtr - mItBegin.mpCurrentArrayPtr) * $T3 + (mItEnd.mpCurrent-mItEnd.mpBegin) - (mItBegin.mpCurrent-mItBegin.mpBegin) != 0">
|
||||
[{(mItEnd.mpCurrentArrayPtr - mItBegin.mpCurrentArrayPtr) * $T3 + (mItEnd.mpCurrent-mItEnd.mpBegin) - (mItBegin.mpCurrent-mItBegin.mpBegin)}]
|
||||
{{
|
||||
{*mItBegin.mpCurrent},
|
||||
...
|
||||
}}
|
||||
</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[size]">(mItEnd.mpCurrentArrayPtr - mItBegin.mpCurrentArrayPtr) * $T3 + (mItEnd.mpCurrent-mItEnd.mpBegin) - (mItBegin.mpCurrent-mItBegin.mpBegin)</Item>
|
||||
<IndexListItems>
|
||||
<Size>(mItEnd.mpCurrentArrayPtr - mItBegin.mpCurrentArrayPtr) * $T3 + (mItEnd.mpCurrent-mItEnd.mpBegin) - (mItBegin.mpCurrent-mItBegin.mpBegin)</Size>
|
||||
<ValueNode>mItBegin.mpCurrentArrayPtr[(mItBegin.mpCurrent-mItBegin.mpBegin + $i) / $T3][(mItBegin.mpCurrent-mItBegin.mpBegin + $i) % $T3]</ValueNode>
|
||||
</IndexListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::DequeIterator<*>">
|
||||
<DisplayString>{*mpCurrent}</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="Value">*mpCurrent</Item>
|
||||
<Item Name="Previous" Condition="mpCurrent == mpBegin">*(*(mpCurrentArrayPtr-1) + (mpEnd-mpBegin) - 1)</Item>
|
||||
<Item Name="Previous" Condition="mpCurrent != mpBegin">*(mpCurrent-1)</Item>
|
||||
<Item Name="Next" Condition="mpCurrent+1 == mpEnd">**(mpCurrentArrayPtr+1)</Item>
|
||||
<Item Name="Next" Condition="mpCurrent+1 != mpEnd">*(mpCurrent+1)</Item>
|
||||
<Item Name="Begin">mpCurrent == mpBegin</Item>
|
||||
<Item Name="End">mpCurrent+1 == mpEnd</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::queue<*>">
|
||||
<AlternativeType Name="eastl::priority_queue<*>" />
|
||||
<AlternativeType Name="eastl::stack<*>" />
|
||||
<DisplayString>{c}</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem>c</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::ListBase<*>">
|
||||
<DisplayString Condition="mNodeAllocator.mFirst.mpNext == &mNodeAllocator.mFirst">
|
||||
[0] {{}}
|
||||
</DisplayString>
|
||||
<DisplayString Condition="mNodeAllocator.mFirst.mpNext != &mNodeAllocator.mFirst && mNodeAllocator.mFirst.mpNext->mpNext == &mNodeAllocator.mFirst">
|
||||
[1] {{ {((eastl::ListNode<$T1>*)mNodeAllocator.mFirst.mpNext)->mValue} }}
|
||||
</DisplayString>
|
||||
<DisplayString Condition="mNodeAllocator.mFirst.mpNext != &mNodeAllocator.mFirst && mNodeAllocator.mFirst.mpNext->mpNext != &mNodeAllocator.mFirst && mNodeAllocator.mFirst.mpNext->mpNext->mpNext == &mNodeAllocator.mFirst">
|
||||
[2]
|
||||
{{
|
||||
{((eastl::ListNode<$T1>*)mNodeAllocator.mFirst.mpNext)->mValue},
|
||||
{((eastl::ListNode<$T1>*)mNodeAllocator.mFirst.mpNext->mpNext)->mValue}
|
||||
}}
|
||||
</DisplayString>
|
||||
<DisplayString Condition="mNodeAllocator.mFirst.mpNext != &mNodeAllocator.mFirst && mNodeAllocator.mFirst.mpNext->mpNext != &mNodeAllocator.mFirst && mNodeAllocator.mFirst.mpNext->mpNext->mpNext != &mNodeAllocator.mFirst">
|
||||
[?]
|
||||
{{
|
||||
{((eastl::ListNode<$T1>*)mNodeAllocator.mFirst.mpNext)->mValue},
|
||||
{((eastl::ListNode<$T1>*)mNodeAllocator.mFirst.mpNext->mpNext)->mValue},
|
||||
...
|
||||
}}
|
||||
</DisplayString>
|
||||
<Expand>
|
||||
<Synthetic Name="NOTE!">
|
||||
<DisplayString>Content of lists will repeat indefinitely. Keep that in mind!</DisplayString>
|
||||
</Synthetic>
|
||||
<LinkedListItems>
|
||||
<HeadPointer>mNodeAllocator.mFirst.mpNext</HeadPointer>
|
||||
<NextPointer>mpNext</NextPointer>
|
||||
<ValueNode>((eastl::ListNode<$T1>*)this)->mValue</ValueNode>
|
||||
</LinkedListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::ListNode<*>">
|
||||
<DisplayString>{mValue}</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="Value">mValue</Item>
|
||||
<Item Name="Next">*(eastl::ListNode<$T1>*)mpNext</Item>
|
||||
<Item Name="Previous">*(eastl::ListNode<$T1>*)mpPrev</Item>
|
||||
<Synthetic Name="NOTE!">
|
||||
<DisplayString>Content of lists will repeat indefinitely. Keep that in mind!</DisplayString>
|
||||
</Synthetic>
|
||||
<Synthetic Name="List">
|
||||
<DisplayString>The rest of the list follows:</DisplayString>
|
||||
</Synthetic>
|
||||
<LinkedListItems>
|
||||
<HeadPointer>(eastl::ListNode<$T1>*)mpNext->mpNext</HeadPointer>
|
||||
<NextPointer>(eastl::ListNode<$T1>*)mpNext</NextPointer>
|
||||
<ValueNode>mValue</ValueNode>
|
||||
</LinkedListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::ListIterator<*>">
|
||||
<DisplayString>{*mpNode}</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem>*(eastl::ListNode<$T1>*)mpNode</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::SListBase<*>">
|
||||
<DisplayString Condition="mNode.mpNext == 0">
|
||||
[0] {{}}
|
||||
</DisplayString>
|
||||
<DisplayString Condition="mNode.mpNext != 0 && mNode.mpNext->mpNext == 0">
|
||||
[1]
|
||||
{{
|
||||
{((eastl::SListNode<$T1>*)mNode.mpNext)->mValue}
|
||||
}}
|
||||
</DisplayString>
|
||||
<DisplayString Condition="mNode.mpNext != 0 && mNode.mpNext->mpNext != 0 && mNode.mpNext->mpNext->mpNext == 0">
|
||||
[2]
|
||||
{{
|
||||
{((eastl::SListNode<$T1>*)mNode.mpNext)->mValue},
|
||||
{((eastl::SListNode<$T1>*)mNode.mpNext->mpNext)->mValue}
|
||||
}}
|
||||
</DisplayString>
|
||||
<DisplayString Condition="mNode.mpNext != 0 && mNode.mpNext->mpNext != 0 && mNode.mpNext->mpNext->mpNext != 0">
|
||||
[?]
|
||||
{{
|
||||
{((eastl::SListNode<$T1>*)mNode.mpNext)->mValue},
|
||||
{((eastl::SListNode<$T1>*)mNode.mpNext->mpNext)->mValue},
|
||||
...
|
||||
}}
|
||||
</DisplayString>
|
||||
<Expand>
|
||||
<LinkedListItems>
|
||||
<HeadPointer>mNode.mpNext</HeadPointer>
|
||||
<NextPointer>mpNext</NextPointer>
|
||||
<ValueNode>((eastl::SListNode<$T1>*)this)->mValue</ValueNode>
|
||||
</LinkedListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::SListNode<*>">
|
||||
<DisplayString>{mValue}</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="Value">mValue</Item>
|
||||
<Item Name="Next">*(eastl::SListNode<$T1>*)mpNext</Item>
|
||||
<Synthetic Name="List">
|
||||
<DisplayString>The rest of the list follows:</DisplayString>
|
||||
</Synthetic>
|
||||
<LinkedListItems>
|
||||
<HeadPointer>mpNext == nullptr ? nullptr : (eastl::SListNode<$T1>*)mpNext->mpNext</HeadPointer>
|
||||
<NextPointer>(eastl::SListNode<$T1>*)mpNext</NextPointer>
|
||||
<ValueNode>mValue</ValueNode>
|
||||
</LinkedListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::SListIterator<*>">
|
||||
<DisplayString>{*mpNode}</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem>*(eastl::SListNode<$T1>*)mpNode</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::intrusive_list_base">
|
||||
<DisplayString Condition="mAnchor.mpNext == &mAnchor">[0] {{}}</DisplayString>
|
||||
<DisplayString Condition="mAnchor.mpNext != &mAnchor && mAnchor.mpNext->mpNext == &mAnchor">[1] {{ {mAnchor.mpNext} }}</DisplayString>
|
||||
<DisplayString Condition="mAnchor.mpNext != &mAnchor && mAnchor.mpNext->mpNext != &mAnchor">[?] {{ {mAnchor.mpNext}, ... }}</DisplayString>
|
||||
<Expand>
|
||||
<Synthetic Name="NOTE!">
|
||||
<DisplayString>Content of intrusive lists will repeat indefinitely. Keep that in mind!</DisplayString>
|
||||
</Synthetic>
|
||||
<LinkedListItems>
|
||||
<HeadPointer>mAnchor.mpNext</HeadPointer>
|
||||
<NextPointer>mpNext</NextPointer>
|
||||
<ValueNode>*this</ValueNode>
|
||||
</LinkedListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::intrusive_list_iterator<*>">
|
||||
<DisplayString>{*($T1*)mpNode}</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem>*($T1*)mpNode</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::set<*>">
|
||||
<AlternativeType Name="eastl::multiset<*>" />
|
||||
<DisplayString Condition="mnSize == 0">
|
||||
[0] {{}}
|
||||
</DisplayString>
|
||||
<DisplayString Condition="mnSize == 1">
|
||||
[1]
|
||||
{{
|
||||
{((eastl::rbtree_node<$T1>*)mAnchor.mpNodeLeft)->mValue}
|
||||
}}
|
||||
</DisplayString>
|
||||
<DisplayString Condition="mnSize > 1">
|
||||
[{mnSize}]
|
||||
{{
|
||||
{((eastl::rbtree_node<$T1>*)mAnchor.mpNodeLeft)->mValue},
|
||||
...
|
||||
}}
|
||||
</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[size]">mnSize</Item>
|
||||
<TreeItems>
|
||||
<Size>mnSize</Size>
|
||||
<HeadPointer>mAnchor.mpNodeParent</HeadPointer>
|
||||
<LeftPointer>mpNodeLeft</LeftPointer>
|
||||
<RightPointer>mpNodeRight</RightPointer>
|
||||
<ValueNode>((eastl::rbtree_node<$T1>*)this)->mValue</ValueNode>
|
||||
</TreeItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::rbtree<*,*>">
|
||||
<DisplayString Condition="mnSize == 0">
|
||||
[0] {{}}
|
||||
</DisplayString>
|
||||
<DisplayString Condition="mnSize == 1">
|
||||
[1]
|
||||
{{
|
||||
{((eastl::rbtree_node<$T2>*)mAnchor.mpNodeLeft)->mValue}
|
||||
}}
|
||||
</DisplayString>
|
||||
<DisplayString Condition="mnSize > 1">
|
||||
[{mnSize}]
|
||||
{{
|
||||
{((eastl::rbtree_node<$T2>*)mAnchor.mpNodeLeft)->mValue},
|
||||
...
|
||||
}}
|
||||
</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[size]">mnSize</Item>
|
||||
<TreeItems>
|
||||
<Size>mnSize</Size>
|
||||
<HeadPointer>mAnchor.mpNodeParent</HeadPointer>
|
||||
<LeftPointer>mpNodeLeft</LeftPointer>
|
||||
<RightPointer>mpNodeRight</RightPointer>
|
||||
<ValueNode>((eastl::rbtree_node<$T2>*)this)->mValue</ValueNode>
|
||||
</TreeItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::rbtree_node<*>">
|
||||
<DisplayString>{mValue}</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="Value">mValue</Item>
|
||||
<Synthetic Name="NOTE!">
|
||||
<DisplayString>It is possible to expand parents that do not exist.</DisplayString>
|
||||
</Synthetic>
|
||||
<Item Name="Parent">*(eastl::rbtree_node<$T1>*)mpNodeParent</Item>
|
||||
<Item Name="Left">*(eastl::rbtree_node<$T1>*)mpNodeLeft</Item>
|
||||
<Item Name="Right">*(eastl::rbtree_node<$T1>*)mpNodeRight</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::rbtree_iterator<*>">
|
||||
<DisplayString>{*(eastl::rbtree_node<$T1>*)mpNode}</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="Node">*(eastl::rbtree_node<$T1>*)mpNode</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
|
||||
<Type Name="eastl::hashtable<*>">
|
||||
<DisplayString Condition="mnElementCount == 0">[{mnElementCount}] {{}}</DisplayString>
|
||||
<DisplayString Condition="mnElementCount != 0">[{mnElementCount}] {{ ... }}</DisplayString>
|
||||
<Expand>
|
||||
<ArrayItems IncludeView="detailed">
|
||||
<Size>mnBucketCount</Size>
|
||||
<ValuePointer>mpBucketArray</ValuePointer>
|
||||
</ArrayItems>
|
||||
<CustomListItems ExcludeView="detailed">
|
||||
<Variable Name="bucketIndex" InitialValue="0"/>
|
||||
<Variable Name="entry" InitialValue ="mpBucketArray[bucketIndex]"/>
|
||||
<Loop>
|
||||
<Item Condition="entry != nullptr">entry->mValue</Item>
|
||||
<If Condition="entry != nullptr">
|
||||
<Exec>entry = entry->mpNext</Exec>
|
||||
</If>
|
||||
<If Condition="entry == nullptr">
|
||||
<Exec>bucketIndex++</Exec>
|
||||
<Break Condition="bucketIndex == mnBucketCount"/>
|
||||
<Exec>entry = mpBucketArray[bucketIndex]</Exec>
|
||||
</If>
|
||||
</Loop>
|
||||
</CustomListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<!-- specifically for hash_map (instead of base implementation hashtable),
|
||||
show the key as name, and value as value, instead of index -> pair<key, value> -->
|
||||
<Type Name="eastl::hash_map<*>">
|
||||
<DisplayString Condition="mnElementCount == 0">[{mnElementCount}] {{}}</DisplayString>
|
||||
<DisplayString Condition="mnElementCount != 0">[{mnElementCount}] {{ ... }}</DisplayString>
|
||||
<Expand>
|
||||
<CustomListItems ExcludeView="detailed">
|
||||
<Variable Name="bucketIndex" InitialValue="0"/>
|
||||
<Variable Name="entry" InitialValue ="mpBucketArray[bucketIndex]"/>
|
||||
<Loop>
|
||||
<Item Name="[{entry->mValue.first}]" Condition="entry != nullptr">entry->mValue.second</Item>
|
||||
<If Condition="entry != nullptr">
|
||||
<Exec>entry = entry->mpNext</Exec>
|
||||
</If>
|
||||
<If Condition="entry == nullptr">
|
||||
<Exec>bucketIndex++</Exec>
|
||||
<Break Condition="bucketIndex == mnBucketCount"/>
|
||||
<Exec>entry = mpBucketArray[bucketIndex]</Exec>
|
||||
</If>
|
||||
</Loop>
|
||||
</CustomListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::hash_node<*>">
|
||||
<DisplayString Condition="this != 0 && mpNext != 0"> {mValue}, {*mpNext}</DisplayString>
|
||||
<DisplayString Condition="this != 0 && mpNext == 0"> {mValue}</DisplayString>
|
||||
<DisplayString Condition="this == 0"></DisplayString>
|
||||
<Expand>
|
||||
<LinkedListItems>
|
||||
<HeadPointer>this</HeadPointer>
|
||||
<NextPointer>mpNext</NextPointer>
|
||||
<ValueNode>mValue</ValueNode>
|
||||
</LinkedListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::hashtable_iterator_base<*>">
|
||||
<DisplayString>{mpNode->mValue}</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem>mpNode->mValue</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::reverse_iterator<*>">
|
||||
<DisplayString>{*(mIterator-1)}</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem>mIterator-1</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::bitset<*>">
|
||||
<DisplayString>{{count = {kSize}}}</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[count]">kSize</Item>
|
||||
<CustomListItems>
|
||||
<Variable Name="iWord" InitialValue="0" />
|
||||
<Variable Name="iBitInWord" InitialValue="0" />
|
||||
<Variable Name="bBitValue" InitialValue="false" />
|
||||
|
||||
<Size>kSize</Size>
|
||||
|
||||
<Loop>
|
||||
<Exec>bBitValue = ((mWord[iWord] >> iBitInWord) % 2) != 0 ? true : false</Exec>
|
||||
<Item>bBitValue</Item>
|
||||
<Exec>iBitInWord++</Exec>
|
||||
<If Condition="iBitInWord == kBitsPerWord">
|
||||
<Exec>iWord++</Exec>
|
||||
<Exec>iBitInWord = 0</Exec>
|
||||
</If>
|
||||
</Loop>
|
||||
</CustomListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::ring_buffer<*,*,*>">
|
||||
<DisplayString>{c}</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem>c</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::basic_string_view<*>">
|
||||
<DisplayString>{mpBegin,[mnCount]}</DisplayString>
|
||||
<StringView>mpBegin,[mnCount]</StringView>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::compressed_pair_imp<*>">
|
||||
<DisplayString Condition="($T3) == 0" Optional="true">({mFirst}, {mSecond})</DisplayString>
|
||||
<DisplayString Condition="($T3) == 1" Optional="true">({mSecond})</DisplayString>
|
||||
<DisplayString Condition="($T3) == 2" Optional="true">({mFirst})</DisplayString>
|
||||
<DisplayString Condition="($T3) == 3" Optional="true">(empty)</DisplayString>
|
||||
<DisplayString Condition="($T3) == 4" Optional="true">(empty)</DisplayString>
|
||||
<DisplayString Condition="($T3) == 5" Optional="true">({mFirst}, {mSecond})</DisplayString>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::optional<*>">
|
||||
<Intrinsic Name="value" Expression="*($T1*)&val"/>
|
||||
<DisplayString Condition="!engaged">nullopt</DisplayString>
|
||||
<DisplayString Condition="engaged">{value()}</DisplayString>
|
||||
<Expand>
|
||||
<Item Condition="engaged" Name="value">value()</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::ratio<*>">
|
||||
<DisplayString>{$T1} to {$T2}}</DisplayString>
|
||||
</Type>
|
||||
|
||||
|
||||
<Type Name="eastl::chrono::duration<*,eastl::ratio<1,1000000000> >">
|
||||
<DisplayString>{mRep} nanoseconds</DisplayString>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::chrono::duration<*,eastl::ratio<1,1000000> >">
|
||||
<DisplayString>{mRep} microseconds</DisplayString>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::chrono::duration<*,eastl::ratio<1,1000> >">
|
||||
<DisplayString>{mRep} milliseconds</DisplayString>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::chrono::duration<*,eastl::ratio<1,1> >">
|
||||
<DisplayString>{mRep} seconds</DisplayString>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::chrono::duration<*,eastl::ratio<60,1> >">
|
||||
<DisplayString>{mRep} minutes</DisplayString>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::chrono::duration<*,eastl::ratio<3600,1> >">
|
||||
<DisplayString>{mRep} hours</DisplayString>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::chrono::duration<*,eastl::ratio<*,*> >">
|
||||
<DisplayString>{mRep} duration with ratio = [{$T2} : {$T3}] </DisplayString>
|
||||
</Type>
|
||||
|
||||
|
||||
|
||||
<Type Name="eastl::function<*>">
|
||||
<DisplayString Condition="mInvokeFuncPtr == nullptr">empty</DisplayString>
|
||||
<DisplayString>{mInvokeFuncPtr}</DisplayString>
|
||||
</Type>
|
||||
|
||||
|
||||
<Type Name="eastl::reference_wrapper<*>">
|
||||
<DisplayString>{*val}</DisplayString>
|
||||
</Type>
|
||||
|
||||
<!--
|
||||
This implementation isn't ideal because it can't switch between showing inline value vs values stored in a heap allocation.
|
||||
We are hitting the limit of natvis scripting that we can't workaround unless we change the implementation of eastl::any.
|
||||
-->
|
||||
<Type Name="eastl::any">
|
||||
<DisplayString Condition="m_handler == nullptr">empty</DisplayString>
|
||||
<DisplayString Condition="m_handler != nullptr">{m_storage.external_storage}</DisplayString>
|
||||
</Type>
|
||||
|
||||
|
||||
<Type Name="eastl::atomic<*>">
|
||||
<DisplayString>{mAtomic}</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem>mAtomic</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::atomic_flag">
|
||||
<DisplayString>{mFlag.mAtomic}</DisplayString>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::variant<*>">
|
||||
<Intrinsic Name="index" Expression="(int)mIndex"/>
|
||||
<DisplayString Condition="index() == size_t(-1)">[valueless_by_exception]</DisplayString>
|
||||
<DisplayString Condition="index() == 0" Optional="true">{{ index=0, value={($T1*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 1" Optional="true">{{ index=1, value={($T2*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 2" Optional="true">{{ index=2, value={($T3*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 3" Optional="true">{{ index=3, value={($T4*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 4" Optional="true">{{ index=4, value={($T5*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 5" Optional="true">{{ index=5, value={($T6*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 6" Optional="true">{{ index=6, value={($T7*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 7" Optional="true">{{ index=7, value={($T8*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 8" Optional="true">{{ index=8, value={($T9*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 9" Optional="true">{{ index=9, value={($T10*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 10" Optional="true">{{ index=10, value={($T11*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 11" Optional="true">{{ index=11, value={($T12*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 12" Optional="true">{{ index=12, value={($T13*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 13" Optional="true">{{ index=13, value={($T14*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 14" Optional="true">{{ index=14, value={($T15*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 15" Optional="true">{{ index=15, value={($T16*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 16" Optional="true">{{ index=16, value={($T17*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 17" Optional="true">{{ index=17, value={($T18*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 18" Optional="true">{{ index=18, value={($T19*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 19" Optional="true">{{ index=19, value={($T20*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 20" Optional="true">{{ index=20, value={($T21*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 21" Optional="true">{{ index=21, value={($T22*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 22" Optional="true">{{ index=22, value={($T23*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 23" Optional="true">{{ index=23, value={($T24*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 24" Optional="true">{{ index=24, value={($T25*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 25" Optional="true">{{ index=25, value={($T26*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 26" Optional="true">{{ index=26, value={($T27*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 27" Optional="true">{{ index=27, value={($T28*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 28" Optional="true">{{ index=28, value={($T29*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 29" Optional="true">{{ index=29, value={($T30*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<DisplayString Condition="index() == 30" Optional="true">{{ index=30, value={($T31*)mStorage.mBuffer.mCharData}}</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="index">index()</Item>
|
||||
<Item Name="[value]" Condition="index() == 0" Optional="true">($T1*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 1" Optional="true">($T2*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 2" Optional="true">($T3*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 3" Optional="true">($T4*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 4" Optional="true">($T5*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 5" Optional="true">($T6*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 6" Optional="true">($T7*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 7" Optional="true">($T8*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 8" Optional="true">($T9*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 9" Optional="true">($T10*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 10" Optional="true">($T11*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 11" Optional="true">($T12*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 12" Optional="true">($T13*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 13" Optional="true">($T14*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 14" Optional="true">($T15*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 15" Optional="true">($T16*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 16" Optional="true">($T17*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 17" Optional="true">($T18*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 18" Optional="true">($T19*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 19" Optional="true">($T20*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 20" Optional="true">($T21*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 21" Optional="true">($T22*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 22" Optional="true">($T23*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 23" Optional="true">($T24*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 24" Optional="true">($T25*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 25" Optional="true">($T26*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 26" Optional="true">($T27*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 27" Optional="true">($T28*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 28" Optional="true">($T29*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 29" Optional="true">($T30*)mStorage.mBuffer.mCharData</Item>
|
||||
<Item Name="[value]" Condition="index() == 30" Optional="true">($T31*)mStorage.mBuffer.mCharData</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
|
||||
<Type Name="eastl::tuple<>">
|
||||
<DisplayString IncludeView="noparens"></DisplayString>
|
||||
<DisplayString ExcludeView="noparens">({*this,view(noparens)})</DisplayString>
|
||||
<Expand/>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::tuple<*>">
|
||||
<DisplayString IncludeView="noparens">{(*((eastl::Internal::TupleLeaf<0,$T1,0>*)&mImpl)).mValue}</DisplayString>
|
||||
<DisplayString ExcludeView="noparens">({*this,view(noparens)})</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[0]">(*((eastl::Internal::TupleLeaf<0,$T1,0>*)&mImpl)).mValue</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::tuple<*,*>">
|
||||
<DisplayString IncludeView="noparens">{(*((eastl::Internal::TupleLeaf<0,$T1,0>*)&mImpl)).mValue}, {(*((eastl::Internal::TupleLeaf<1,$T2,0>*)&mImpl)).mValue}</DisplayString>
|
||||
<DisplayString ExcludeView="noparens">({*this,view(noparens)})</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[0]">(*((eastl::Internal::TupleLeaf<0,$T1,0>*)&mImpl)).mValue</Item>
|
||||
<Item Name="[1]">(*((eastl::Internal::TupleLeaf<1,$T2,0>*)&mImpl)).mValue</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::tuple<*,*,*>">
|
||||
<DisplayString IncludeView="noparens">{(*((eastl::Internal::TupleLeaf<0,$T1,0>*)&mImpl)).mValue}, {(*((eastl::Internal::TupleLeaf<1,$T2,0>*)&mImpl)).mValue}, {(*((eastl::Internal::TupleLeaf<2,$T3,0>*)&mImpl)).mValue}</DisplayString>
|
||||
<DisplayString ExcludeView="noparens">({*this,view(noparens)})</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[0]">(*((eastl::Internal::TupleLeaf<0,$T1,0>*)&mImpl)).mValue</Item>
|
||||
<Item Name="[1]">(*((eastl::Internal::TupleLeaf<1,$T2,0>*)&mImpl)).mValue</Item>
|
||||
<Item Name="[2]">(*((eastl::Internal::TupleLeaf<2,$T3,0>*)&mImpl)).mValue</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::tuple<*,*,*,*>">
|
||||
<DisplayString IncludeView="noparens">{(*((eastl::Internal::TupleLeaf<0,$T1,0>*)&mImpl)).mValue}, {(*((eastl::Internal::TupleLeaf<1,$T2,0>*)&mImpl)).mValue}, {(*((eastl::Internal::TupleLeaf<2,$T3,0>*)&mImpl)).mValue}, {(*((eastl::Internal::TupleLeaf<3,$T4,0>*)&mImpl)).mValue}</DisplayString>
|
||||
<DisplayString ExcludeView="noparens">({*this,view(noparens)})</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[0]">(*((eastl::Internal::TupleLeaf<0,$T1,0>*)&mImpl)).mValue</Item>
|
||||
<Item Name="[1]">(*((eastl::Internal::TupleLeaf<1,$T2,0>*)&mImpl)).mValue</Item>
|
||||
<Item Name="[2]">(*((eastl::Internal::TupleLeaf<2,$T3,0>*)&mImpl)).mValue</Item>
|
||||
<Item Name="[3]">(*((eastl::Internal::TupleLeaf<3,$T4,0>*)&mImpl)).mValue</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::tuple<*,*,*,*,*>">
|
||||
<DisplayString IncludeView="noparens">{(*((eastl::Internal::TupleLeaf<0,$T1,0>*)&mImpl)).mValue}, {(*((eastl::Internal::TupleLeaf<1,$T2,0>*)&mImpl)).mValue}, {(*((eastl::Internal::TupleLeaf<2,$T3,0>*)&mImpl)).mValue}, {(*((eastl::Internal::TupleLeaf<3,$T4,0>*)&mImpl)).mValue}, {(*((eastl::Internal::TupleLeaf<4,$T5,0>*)&mImpl)).mValue}</DisplayString>
|
||||
<DisplayString ExcludeView="noparens">({*this,view(noparens)})</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[0]">(*((eastl::Internal::TupleLeaf<0,$T1,0>*)&mImpl)).mValue</Item>
|
||||
<Item Name="[1]">(*((eastl::Internal::TupleLeaf<1,$T2,0>*)&mImpl)).mValue</Item>
|
||||
<Item Name="[2]">(*((eastl::Internal::TupleLeaf<2,$T3,0>*)&mImpl)).mValue</Item>
|
||||
<Item Name="[3]">(*((eastl::Internal::TupleLeaf<3,$T4,0>*)&mImpl)).mValue</Item>
|
||||
<Item Name="[4]">(*((eastl::Internal::TupleLeaf<4,$T5,0>*)&mImpl)).mValue</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::tuple<*,*,*,*,*,*>">
|
||||
<DisplayString IncludeView="noparens">{(*((eastl::Internal::TupleLeaf<0,$T1,0>*)&mImpl)).mValue}, {(*((eastl::Internal::TupleLeaf<1,$T2,0>*)&mImpl)).mValue}, {(*((eastl::Internal::TupleLeaf<2,$T3,0>*)&mImpl)).mValue}, {(*((eastl::Internal::TupleLeaf<3,$T4,0>*)&mImpl)).mValue}, {(*((eastl::Internal::TupleLeaf<4,$T5,0>*)&mImpl)).mValue}, {(*((eastl::Internal::TupleLeaf<5,$T6,0>*)&mImpl)).mValue}</DisplayString>
|
||||
<DisplayString ExcludeView="noparens">({*this,view(noparens)})</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[0]">(*((eastl::Internal::TupleLeaf<0,$T1,0>*)&mImpl)).mValue</Item>
|
||||
<Item Name="[1]">(*((eastl::Internal::TupleLeaf<1,$T2,0>*)&mImpl)).mValue</Item>
|
||||
<Item Name="[2]">(*((eastl::Internal::TupleLeaf<2,$T3,0>*)&mImpl)).mValue</Item>
|
||||
<Item Name="[3]">(*((eastl::Internal::TupleLeaf<3,$T4,0>*)&mImpl)).mValue</Item>
|
||||
<Item Name="[4]">(*((eastl::Internal::TupleLeaf<4,$T5,0>*)&mImpl)).mValue</Item>
|
||||
<Item Name="[5]">(*((eastl::Internal::TupleLeaf<5,$T6,0>*)&mImpl)).mValue</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="eastl::tuple<*,*,*,*,*,*,*>">
|
||||
<DisplayString IncludeView="noparens">{(*((eastl::Internal::TupleLeaf<0,$T1,0>*)&mImpl)).mValue}, {(*((eastl::Internal::TupleLeaf<1,$T2,0>*)&mImpl)).mValue}, {(*((eastl::Internal::TupleLeaf<2,$T3,0>*)&mImpl)).mValue}, {(*((eastl::Internal::TupleLeaf<3,$T4,0>*)&mImpl)).mValue}, {(*((eastl::Internal::TupleLeaf<4,$T5,0>*)&mImpl)).mValue}, {(*((eastl::Internal::TupleLeaf<5,$T6,0>*)&mImpl)).mValue}, {(*((eastl::Internal::TupleLeaf<6,$T7,0>*)&mImpl)).mValue}</DisplayString>
|
||||
<DisplayString ExcludeView="noparens">({*this,view(noparens)})</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[0]">(*((eastl::Internal::TupleLeaf<0,$T1,0>*)&mImpl)).mValue</Item>
|
||||
<Item Name="[1]">(*((eastl::Internal::TupleLeaf<1,$T2,0>*)&mImpl)).mValue</Item>
|
||||
<Item Name="[2]">(*((eastl::Internal::TupleLeaf<2,$T3,0>*)&mImpl)).mValue</Item>
|
||||
<Item Name="[3]">(*((eastl::Internal::TupleLeaf<3,$T4,0>*)&mImpl)).mValue</Item>
|
||||
<Item Name="[4]">(*((eastl::Internal::TupleLeaf<4,$T5,0>*)&mImpl)).mValue</Item>
|
||||
<Item Name="[5]">(*((eastl::Internal::TupleLeaf<5,$T6,0>*)&mImpl)).mValue</Item>
|
||||
<Item Name="[6]">(*((eastl::Internal::TupleLeaf<6,$T7,0>*)&mImpl)).mValue</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
|
||||
</AutoVisualizer>
|
||||
66
conanfile.py
Normal file
66
conanfile.py
Normal file
@@ -0,0 +1,66 @@
|
||||
from conan import ConanFile
|
||||
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout
|
||||
from conan.tools.files import copy
|
||||
import os
|
||||
|
||||
required_conan_version = ">=1.33.0"
|
||||
|
||||
class Bigfoot(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"
|
||||
|
||||
# Binary configuration
|
||||
settings = "os", "compiler", "build_type", "arch"
|
||||
options = {
|
||||
"shared": [True, False],
|
||||
"fPIC": [True, False],
|
||||
"build_tests": [True, False],
|
||||
}
|
||||
default_options = {
|
||||
"shared": False,
|
||||
"fPIC": True,
|
||||
"build_tests": False,
|
||||
}
|
||||
|
||||
generators = "CMakeDeps"
|
||||
|
||||
def layout(self):
|
||||
cmake_layout(self)
|
||||
|
||||
def configure(self):
|
||||
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
|
||||
|
||||
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("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)
|
||||
|
||||
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.generate()
|
||||
|
||||
def build(self):
|
||||
cmake = CMake(self)
|
||||
cmake.configure()
|
||||
cmake.build()
|
||||
71
format.bat
Normal file
71
format.bat
Normal file
@@ -0,0 +1,71 @@
|
||||
@echo off
|
||||
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||
|
||||
REM =========================
|
||||
REM Variables
|
||||
REM =========================
|
||||
SET FMT=clang-format
|
||||
SET MODE=
|
||||
SET EXIT_CODE=0
|
||||
|
||||
REM =========================
|
||||
REM Parse arguments
|
||||
REM =========================
|
||||
:parse_args
|
||||
IF "%~1"=="" GOTO end_parse_args
|
||||
IF "%~1"=="--check" (
|
||||
SET MODE=check
|
||||
) ELSE IF "%~1"=="--fix" (
|
||||
SET MODE=fix
|
||||
) ELSE (
|
||||
REM Accumulate directories
|
||||
SET DIRS=!DIRS! "%~1"
|
||||
)
|
||||
SHIFT
|
||||
GOTO parse_args
|
||||
:end_parse_args
|
||||
|
||||
IF "%MODE%"=="" (
|
||||
ECHO Usage: %~nx0 --check|--fix <directory> [<directory> ...]
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
IF "%DIRS%"=="" (
|
||||
ECHO Please provide at least one directory.
|
||||
EXIT /B 1
|
||||
)
|
||||
|
||||
REM =========================
|
||||
REM Iterate over directories
|
||||
REM =========================
|
||||
FOR %%D IN (%DIRS%) DO (
|
||||
IF NOT EXIST "%%~D" (
|
||||
ECHO %%~D is not a valid directory.
|
||||
SET EXIT_CODE=1
|
||||
GOTO :continue_dirs
|
||||
)
|
||||
|
||||
REM Recursively find source files
|
||||
FOR /R "%%~D" %%F IN (*.h *.hpp *.c *.cpp *.m *.mm) DO (
|
||||
SET FILE=%%F
|
||||
REM Skip *_generated* files
|
||||
ECHO !FILE! | FINDSTR /I "_generated" >nul
|
||||
IF ERRORLEVEL 1 (
|
||||
IF "%MODE%"=="fix" (
|
||||
ECHO Formatting !FILE!
|
||||
%FMT% -i "!FILE!"
|
||||
) ELSE (
|
||||
ECHO Checking !FILE!
|
||||
%FMT% --dry-run --Werror "!FILE!" 2>nul
|
||||
IF ERRORLEVEL 1 (
|
||||
REM clang-format will already print diagnostics
|
||||
SET EXIT_CODE=1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
:continue_dirs
|
||||
)
|
||||
|
||||
EXIT /B %EXIT_CODE%
|
||||
68
format.sh
Normal file
68
format.sh
Normal file
@@ -0,0 +1,68 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
FMT="clang-format"
|
||||
MODE=""
|
||||
DIRS=()
|
||||
EXIT_CODE=0
|
||||
|
||||
# =========================
|
||||
# Parse arguments
|
||||
# =========================
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--check)
|
||||
MODE="check"
|
||||
;;
|
||||
--fix)
|
||||
MODE="fix"
|
||||
;;
|
||||
*)
|
||||
DIRS+=("$arg")
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Ensure mode is set
|
||||
if [[ -z "$MODE" ]]; then
|
||||
echo "Usage: $0 --check|--fix <directory> [<directory> ...]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Ensure at least one directory
|
||||
if [[ ${#DIRS[@]} -eq 0 ]]; then
|
||||
echo "Please provide at least one directory."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# =========================
|
||||
# Process directories
|
||||
# =========================
|
||||
for DIR in "${DIRS[@]}"; do
|
||||
if [[ ! -d "$DIR" ]]; then
|
||||
echo "$DIR is not a valid directory."
|
||||
EXIT_CODE=1
|
||||
continue
|
||||
fi
|
||||
|
||||
# Find all source files safely (null-separated)
|
||||
while IFS= read -r -d '' FILE; do
|
||||
[[ "$FILE" == *_generated* ]] && continue
|
||||
|
||||
if [[ "$MODE" == "fix" ]]; then
|
||||
echo "Formatting $FILE"
|
||||
"$FMT" -i "$FILE"
|
||||
else
|
||||
echo "Checking $FILE"
|
||||
# Check mode: clang-format diagnostic only
|
||||
if ! "$FMT" --dry-run --Werror "$FILE"; then
|
||||
# clang-format prints: file:line:col: error ...
|
||||
EXIT_CODE=1
|
||||
fi
|
||||
fi
|
||||
done < <(
|
||||
find "$DIR" \( -name '*.h' -o -name '*.hpp' -o -name '*.c' -o -name '*.cpp' -o -name '*.m' -o -name '*.mm' \) -print0
|
||||
)
|
||||
done
|
||||
|
||||
exit $EXIT_CODE
|
||||
1
generate_bin2cpp.bat
Normal file
1
generate_bin2cpp.bat
Normal file
@@ -0,0 +1 @@
|
||||
cmake -S . -B build --toolchain build/generators/conan_toolchain.cmake --graphviz=graphviz/graph.dot
|
||||
3
generate_bin2cpp.sh
Normal file
3
generate_bin2cpp.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
cmake -S . -B build/Debug --toolchain build/build/Debug/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE="Debug" -G "Ninja" --graphviz=graphviz/Debug/graph.dot
|
||||
cmake -S . -B build/Release --toolchain build/build/Release/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE="Release" -G "Ninja" --graphviz=graphviz/Release/graph.dot
|
||||
cmake -S . -B build/RelWithDebInfo --toolchain build/build/RelWithDebInfo/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE="RelWithDebInfo" -G "Ninja" --graphviz=graphviz/RelWithDebInfo/graph.dot
|
||||
33
generate_dependencies.bat
Normal file
33
generate_dependencies.bat
Normal file
@@ -0,0 +1,33 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
REM Check if the correct number of arguments is provided
|
||||
if "%~1"=="" (
|
||||
echo Usage: %0 "[force|missing]"
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Set the build option based on the argument
|
||||
set build_option=
|
||||
if "%~1"=="force" (
|
||||
set build_option=--build="*"
|
||||
) else if "%~1"=="missing" (
|
||||
set build_option=--build=missing
|
||||
) else (
|
||||
echo Invalid argument: %~1
|
||||
echo Usage: %0 "[force|missing]"
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
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 %build_option% -of build -s build_type=Release -o bin2cpp/*:build_tests=True
|
||||
conan install . --deployer=full_deploy --remote=bigfootpackages %build_option% -of build -s build_type=RelWithDebInfo -o bin2cpp/*:build_tests=True
|
||||
conan install . --deployer=full_deploy --remote=bigfootpackages %build_option% -of build -s build_type=Debug -o bin2cpp/*:build_tests=True
|
||||
|
||||
endlocal
|
||||
27
generate_dependencies.sh
Normal file
27
generate_dependencies.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if the correct number of arguments is provided
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: $0 [force|missing]"
|
||||
exit 1
|
||||
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 --build='*' -of build -s build_type=Release -o bin2cpp/*:build_tests=True
|
||||
conan install . --deployer=full_deploy --remote=bigfootpackages --build='*' -of build -s build_type=RelWithDebInfo -o bin2cpp/*:build_tests=True
|
||||
conan install . --deployer=full_deploy --remote=bigfootpackages --build='*' -of build -s build_type=Debug -o bin2cpp/*:build_tests=True
|
||||
elif [ "$1" == "missing" ]; then
|
||||
conan install . --deployer=full_deploy --remote=bigfootpackages --build=missing -of build -s build_type=Release -o bin2cpp/*:build_tests=True
|
||||
conan install . --deployer=full_deploy --remote=bigfootpackages --build=missing -of build -s build_type=RelWithDebInfo -o bin2cpp/*:build_tests=True
|
||||
conan install . --deployer=full_deploy --remote=bigfootpackages --build=missing -of build -s build_type=Debug -o bin2cpp/*:build_tests=True
|
||||
echo "Invalid argument: $1"
|
||||
echo "Usage: $0 [force|missing]"
|
||||
exit 1
|
||||
fi
|
||||
14
sonar-project.properties
Normal file
14
sonar-project.properties
Normal file
@@ -0,0 +1,14 @@
|
||||
sonar.projectKey=Bin2CPP
|
||||
|
||||
sonar.projectVersion=0.1.0
|
||||
|
||||
sonar.sourceEncoding=UTF-8
|
||||
|
||||
sonar.sources=Bin2CPP/Sources
|
||||
sonar.tests=Bin2CPP/Tests
|
||||
|
||||
sonar.cxx.file.suffixes=.hpp,.cpp,.h
|
||||
sonar.cxx.clangtidy.reportPaths=tidy_result.txt
|
||||
sonar.cxx.infer.reportPaths=infer-out/report.json
|
||||
|
||||
sonar.cxx.jsonCompilationDatabase.analyzeOnlyContainedFiles=True
|
||||
Reference in New Issue
Block a user