refresh struct
This commit is contained in:
@@ -3,8 +3,6 @@
|
|||||||
#include "hack/utils/singleton.hpp"
|
#include "hack/utils/singleton.hpp"
|
||||||
#include "hack/utils/func_query.hpp"
|
#include "hack/utils/func_query.hpp"
|
||||||
|
|
||||||
#include "nlohmann/json.hpp"
|
|
||||||
|
|
||||||
int f(int a)
|
int f(int a)
|
||||||
{
|
{
|
||||||
hack::log()("f implementatioln");
|
hack::log()("f implementatioln");
|
||||||
@@ -34,9 +34,11 @@ inc = []
|
|||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
dependency('uuid'),
|
dependency('uuid'),
|
||||||
|
subproject('nlohmann_json').get_variable('nlohmann_json_dep'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
|
|
||||||
subdir('src')
|
subdir('src')
|
||||||
|
subdir('tests')
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ run() {
|
|||||||
command meson compile -C build
|
command meson compile -C build
|
||||||
if [[ -z "$1" ]]; then
|
if [[ -z "$1" ]]; then
|
||||||
cd build
|
cd build
|
||||||
./bin/$PROJECT_NAME
|
./tests/$PROJECT_NAME
|
||||||
cd ..
|
cd ..
|
||||||
else
|
else
|
||||||
meson test $1 -C build
|
meson test $1 -C build
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
project(
|
|
||||||
meson.current_source_dir().split('/').get(-1),
|
|
||||||
'cpp',
|
|
||||||
version : '1.2.0',
|
|
||||||
default_options : [
|
|
||||||
'warning_level=1',
|
|
||||||
'optimization=3',
|
|
||||||
'cpp_std=c++20',
|
|
||||||
])
|
|
||||||
|
|
||||||
add_project_arguments (
|
|
||||||
'-Wpedantic',
|
|
||||||
'-Wno-shadow',
|
|
||||||
'-Wno-unused-but-set-variable',
|
|
||||||
'-Wno-comment',
|
|
||||||
'-Wno-unused-parameter',
|
|
||||||
'-Wno-unused-value',
|
|
||||||
'-Wno-unused-header',
|
|
||||||
'-Wno-missing-field-initializers',
|
|
||||||
'-Wno-narrowing',
|
|
||||||
'-Wno-deprecated-enum-enum-conversion',
|
|
||||||
'-Wno-volatile',
|
|
||||||
'-Wno-format-security',
|
|
||||||
'-Wno-switch',
|
|
||||||
'-Wno-ignored-attributes',
|
|
||||||
'-Wno-unused-variable',
|
|
||||||
language: 'cpp'
|
|
||||||
)
|
|
||||||
|
|
||||||
#############################################################
|
|
||||||
|
|
||||||
args = []
|
|
||||||
inc = []
|
|
||||||
|
|
||||||
deps = [
|
|
||||||
subproject('nlohmann_json').get_variable('nlohmann_json_dep'),
|
|
||||||
subproject('hack').get_variable('hack_dep'),
|
|
||||||
]
|
|
||||||
|
|
||||||
#############################################################
|
|
||||||
|
|
||||||
subdir('bin')
|
|
||||||
Submodule sandbox/subprojects/hack deleted from 04de2af292
@@ -1,7 +0,0 @@
|
|||||||
[wrap-git]
|
|
||||||
url = https://gitcast.ru/chatlanin/hack.git
|
|
||||||
revision = master
|
|
||||||
|
|
||||||
[provide]
|
|
||||||
hack = hack_dep
|
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "hack/logger/logger.hpp"
|
#include "hack/logger/logger.hpp"
|
||||||
|
|
||||||
namespace hack::exception
|
namespace hack
|
||||||
{
|
{
|
||||||
using JSON = nlohmann::json;
|
using JSON = nlohmann::json;
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ namespace hack::exception
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
JSON convert_to_json() override
|
JSON convert_to_json()
|
||||||
{
|
{
|
||||||
JSON j;
|
JSON j;
|
||||||
j["description"] = m_description;
|
j["description"] = m_description;
|
||||||
|
|||||||
11
tests/main.cpp
Normal file
11
tests/main.cpp
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#include <array>
|
||||||
|
|
||||||
|
#include "hack/exception/exception.hpp"
|
||||||
|
|
||||||
|
auto main(int argc, char *argv[]) -> int
|
||||||
|
{
|
||||||
|
hack::exception ex;
|
||||||
|
ex.level("test_leve");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
executable(
|
executable(
|
||||||
meson.project_name(),
|
meson.project_name(),
|
||||||
'utils/main.cpp',
|
'main.cpp',
|
||||||
dependencies : deps,
|
dependencies : deps,
|
||||||
cpp_args: args,
|
cpp_args: args,
|
||||||
include_directories : inc
|
include_directories : inc
|
||||||
Reference in New Issue
Block a user