去除不需要的依赖包,屏蔽暂时不用的代码

This commit is contained in:
fasiondog 2024-07-17 14:58:16 +08:00
parent 4ed0d93024
commit 38954f1b07
9 changed files with 15 additions and 13 deletions

View File

@ -2,8 +2,6 @@ target("demo")
set_kind("binary")
set_default(false)
add_options("hdf5", "mysql", "sqlite", "tdx", "feedback", "stacktrace", "spend_time")
add_packages("boost", "spdlog", "fmt", "flatbuffers")
add_includedirs("..")
@ -14,6 +12,7 @@ target("demo")
if is_plat("windows") and get_config("kind") == "shared" then
add_defines("HKU_API=__declspec(dllimport)")
add_defines("HKU_UTILS_API=__declspec(dllimport)")
add_defines("SQLITE_API=__declspec(dllimport)")
end

View File

@ -10,7 +10,7 @@
#include <boost/uuid/uuid.hpp>
#include <boost/uuid/uuid_io.hpp>
#include <boost/uuid/uuid_generators.hpp>
#include <httplib.h>
// #include <httplib.h>
#include <nlohmann/json.hpp>
#include "hikyuu/version.h"
#include "hikyuu/DataType.h"

View File

@ -5,6 +5,7 @@
* Author: fasiondog
*/
#if 0
#include <nlohmann/json.hpp>
#include "../utilities/arithmetic.h"
#include "AccountTradeManager.h"
@ -81,4 +82,5 @@ AccountTradeManager::AccountTradeManager(const string& name, const string& pwd)
}
}
} // namespace hku
} // namespace hku
#endif

View File

@ -7,6 +7,7 @@
#pragma once
#if 0
#include <httplib.h>
#include "../trade_manage/TradeManagerBase.h"
@ -426,4 +427,5 @@ inline TMPtr crtAccountTM(const string& name, const string& pwd) {
return std::make_shared<AccountTradeManager>(name, pwd);
}
} // namespace hku
} // namespace hku
#endif

View File

@ -7,7 +7,7 @@ target("hikyuu")
-- set_kind("shared")
-- end
add_packages("boost", "fmt", "spdlog", "flatbuffers", "nng", "nlohmann_json", "cpp-httplib")
add_packages("boost", "fmt", "spdlog", "flatbuffers", "nng", "nlohmann_json")
if is_plat("windows", "linux", "cross") then
add_packages("sqlite3")
end

View File

@ -5,6 +5,7 @@
* Author: fasiondog
*/
#if 0
#include "../pybind_utils.h"
#include <hikyuu/strategy/AccountTradeManager.h>
@ -13,4 +14,5 @@ namespace py = pybind11;
void export_AccountTradeManger(py::module& m) {
m.def("crtAccountTM", crtAccountTM);
}
}
#endif

View File

@ -10,9 +10,9 @@
namespace py = pybind11;
void export_Strategy(py::module& m);
void export_AccountTradeManger(py::module& m);
// void export_AccountTradeManger(py::module& m);
void export_strategy_main(py::module& m) {
export_Strategy(m);
export_AccountTradeManger(m);
// export_AccountTradeManger(m);
}

View File

@ -10,7 +10,7 @@ target("core")
-- end
add_deps("hikyuu")
add_packages("boost", "fmt", "spdlog", "flatbuffers", "pybind11", "cpp-httplib")
add_packages("boost", "fmt", "spdlog", "flatbuffers", "pybind11")
if is_plat("windows") then
set_filename("core.pyd")
add_cxflags("-wd4251")

View File

@ -199,7 +199,6 @@ local hdf5_version = "1.12.2"
local fmt_version = "10.2.1"
local flatbuffers_version = "24.3.25"
local nng_version = "1.8.0"
local cpp_httplib_version = "0.14.3"
local sqlite_version = "3.46.0+0"
local mysql_version = "8.0.31"
if is_plat("windows") or (is_plat("linux", "cross") and is_arch("aarch64", "arm64.*")) then
@ -259,8 +258,6 @@ add_requires("sqlite3 " .. sqlite_version, {system = false, configs = {shared =
add_requires("flatbuffers v" .. flatbuffers_version, {system = false, configs= {runtimes = get_config("runtimes")}})
add_requires("nng " .. nng_version, {system = false, configs = {cxflags = "-fPIC"}})
add_requires("nlohmann_json", {system = false})
add_requires("cpp-httplib " .. cpp_httplib_version, {system = false, configs = {zlib = true, ssl = true}})
add_requires("zlib", {system = false})
add_defines("SPDLOG_DISABLE_DEFAULT_LOGGER") -- 禁用 spdlog 默认ogger