feat(TOML & Glaze): YAML -> TOML

YAML is a horrid format with far too many edge cases. We have switched
to TOML. Further, we have completly reworked the framework so that

1. There is no longer any global config state. Config objects now must
be passed between scopes by the caller. This will introduce some more
friction but whill also make order of initialization clear
2. Config objects are now strongly typed and there is a single sourth of
truth for any given config object baked in using the some struct.
This commit is contained in:
2025-12-05 14:26:22 -05:00
parent 1a7f4837c6
commit 05b7b94c83
25 changed files with 561 additions and 454 deletions

View File

@@ -0,0 +1,16 @@
glaze_cmake_options = cmake.subproject_options()
glaze_cmake_options.add_cmake_defines({
'BUILD_SHARED_LIBS': 'OFF',
'BUILD_STATIC_LIBS': 'ON',
'CMAKE_INSTALL_LIBDIR': get_option('libdir'),
'CMAKE_INSTALL_INCLUDEDIR': get_option('includedir'),
'CMAKE_POSITION_INDEPENDENT_CODE': 'ON',
'galze_BUILD_EXAMPLES': 'OFF',
})
glaze_sp = cmake.subproject(
'glaze',
options: glaze_cmake_options,
)
glaze_dep = glaze_sp.dependency('glaze_glaze')

View File

@@ -1,2 +1,2 @@
cmake = import('cmake')
subdir('yaml-cpp')
subdir('glaze')

View File

@@ -1,42 +0,0 @@
cmake = import('cmake')
yaml_cpp_cmake_options = cmake.subproject_options()
yaml_cpp_cmake_options.add_cmake_defines({
'BUILD_SHARED_LIBS': 'OFF',
'BUILD_STATIC_LIBS': 'ON',
'YAML_CPP_BUILD_TESTS': 'OFF',
'CMAKE_CXX_FLAGS': '-Wno-shadow',
'CMAKE_C_FLAGS': '-Wno-shadow',
'CMAKE_INSTALL_LIBDIR': get_option('libdir'),
'CMAKE_INSTALL_INCLUDEDIR': get_option('includedir'),
'CMAKE_POLICY_VERSION_MINIMUM': '3.5',
'CMAKE_POSITION_INDEPENDENT_CODE': 'ON'
})
yaml_cpp_sp = cmake.subproject(
'yaml-cpp',
options: yaml_cpp_cmake_options,
)
yaml_cpp_tgt = yaml_cpp_sp.target('yaml-cpp')
yaml_cpp_inc = yaml_cpp_sp.include_directories('yaml-cpp')
empty_yaml_cpp_file = configure_file(
output: 'yaml_cpp_dummy_ar.cpp',
command: ['echo'],
capture: true
)
libyaml_static = static_library(
'yaml_cpp-static',
empty_yaml_cpp_file,
objects: [yaml_cpp_tgt.extract_all_objects(recursive: true)],
include_directories: yaml_cpp_inc,
pic: true,
install: false
)
yaml_cpp_dep = declare_dependency(
link_with: libyaml_static,
include_directories: yaml_cpp_inc,
)