diff --git a/out/bi_web/include/impl/coroutine.h b/out/bi_web/include/impl/coroutine.h index c8b20a3..f93a3a6 100644 --- a/out/bi_web/include/impl/coroutine.h +++ b/out/bi_web/include/impl/coroutine.h @@ -30,8 +30,9 @@ auto getAwaiterImpl(T&& value) noexcept( } template -auto getAwaiter(T&& value) noexcept(noexcept(getAwaiterImpl(static_cast( - value)))) -> decltype(getAwaiterImpl(static_cast(value))) { +auto getAwaiter(T&& value) noexcept( + noexcept(getAwaiterImpl(static_cast(value)))) + -> decltype(getAwaiterImpl(static_cast(value))) { return getAwaiterImpl(static_cast(value)); } diff --git a/out/bi_web/xmake.lua b/out/bi_web/xmake.lua index 9997cd6..18769e5 100644 --- a/out/bi_web/xmake.lua +++ b/out/bi_web/xmake.lua @@ -2,11 +2,13 @@ set_project("web") set_version("0.0.1", {build = "%Y%m%d%H%M"}) -set_xmakever("2.8.5") +set_xmakever("2.9.6") add_repositories("my_private_repo https://github.com/fantasy-peak/xmake-repo.git") -add_requires("nlohmann_json", "spdlog", "drogon", "asio", "cppzmq", "msgpack-cxx") +add_requires("msgpack-cxx", {system = false, configs={boost=false}}) +add_requires("spdlog", {configs={std_format=true}}) +add_requires("nlohmann_json", "spdlog", "drogon", "asio", "cppzmq") set_languages("c++23") set_policy("check.auto_ignore_flags", false) diff --git a/out/include/impl/coroutine.h b/out/include/impl/coroutine.h index c8b20a3..f93a3a6 100644 --- a/out/include/impl/coroutine.h +++ b/out/include/impl/coroutine.h @@ -30,8 +30,9 @@ auto getAwaiterImpl(T&& value) noexcept( } template -auto getAwaiter(T&& value) noexcept(noexcept(getAwaiterImpl(static_cast( - value)))) -> decltype(getAwaiterImpl(static_cast(value))) { +auto getAwaiter(T&& value) noexcept( + noexcept(getAwaiterImpl(static_cast(value)))) + -> decltype(getAwaiterImpl(static_cast(value))) { return getAwaiterImpl(static_cast(value)); } diff --git a/src/main.cpp b/src/main.cpp index 45a570f..8152087 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -220,7 +220,7 @@ void formatCode(const std::string& file, const std::string& content) { char buffer[2048] = {}; std::string result; char* clang_format_path = std::getenv("FRPC_CLANG_FORMAT"); - auto command = fmt::format("{} -i {}", clang_format_path ? clang_format_path : "clang-format", file); + auto command = std::format("{} -i {}", clang_format_path ? clang_format_path : "clang-format", file); spdlog::info("start format {}", command); FILE* pipe = popen(command.c_str(), "r"); if (!pipe) { diff --git a/template/web/bi/xmake.lua.inja b/template/web/bi/xmake.lua.inja index 3dbc3f9..38d1c2d 100644 --- a/template/web/bi/xmake.lua.inja +++ b/template/web/bi/xmake.lua.inja @@ -2,11 +2,13 @@ set_project("web") set_version("0.0.1", {build = "%Y%m%d%H%M"}) -set_xmakever("2.8.5") +set_xmakever("2.9.6") add_repositories("my_private_repo https://github.com/fantasy-peak/xmake-repo.git") -add_requires("nlohmann_json", "spdlog", "drogon", "asio", "cppzmq", "msgpack-cxx") +add_requires("msgpack-cxx", {system = false, configs={boost=false}}) +add_requires("spdlog", {configs={std_format=true}}) +add_requires("nlohmann_json", "spdlog", "drogon", "asio", "cppzmq") set_languages("c++23") set_policy("check.auto_ignore_flags", false) diff --git a/test_xmake.lua b/test_xmake.lua index 84fa772..9fc3034 100644 --- a/test_xmake.lua +++ b/test_xmake.lua @@ -4,9 +4,11 @@ set_xmakever("2.8.5") add_repositories("my_private_repo https://github.com/fantasy-peak/xmake-repo.git") -add_requires("spdlog", "asio", "nlohmann_json") +add_requires("boost", {configs={cmake=false}}) +add_requires("spdlog", {configs={std_format=true}}) +add_requires("asio", "nlohmann_json") add_requires("cppzmq", {system = false}) -add_requires("msgpack-cxx", {system = false}) +add_requires("msgpack-cxx", {system = false, configs={boost=false}}) set_policy("check.auto_ignore_flags", false) add_cxflags("-O2 -Wall -Wextra -pedantic-errors -Wno-missing-field-initializers -Wno-ignored-qualifiers") @@ -24,7 +26,7 @@ target("coro_bi") set_languages("c++20") set_kind("binary") add_files("test/cpp/coro_bi.cpp") - add_packages("msgpack-cxx", "nlohmann_json", "cppzmq", "spdlog", "asio") + add_packages("msgpack-cxx", "nlohmann_json", "cppzmq", "spdlog", "asio", "boost") add_syslinks("pthread", "uuid") target_end() diff --git a/xmake.lua b/xmake.lua index f02d5f4..e5147ad 100644 --- a/xmake.lua +++ b/xmake.lua @@ -6,7 +6,9 @@ add_defines("VERSION=\"1.0.0\"") add_repositories("my_private_repo https://github.com/fantasy-peak/xmake-repo.git") -add_requires("yaml-cpp", "nlohmann_json", "spdlog", "inja", "boost") +add_requires("boost", {configs={cmake=false}}) +add_requires("spdlog", {configs={std_format=true}}) +add_requires("yaml-cpp", "nlohmann_json", "inja") set_languages("c++23") set_policy("check.auto_ignore_flags", false)