Skip to content

Commit

Permalink
Fix xmake-repo boost
Browse files Browse the repository at this point in the history
  • Loading branch information
fantasy-peak committed Nov 7, 2024
1 parent 26211f4 commit e8a576d
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 13 deletions.
5 changes: 3 additions & 2 deletions out/bi_web/include/impl/coroutine.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ auto getAwaiterImpl(T&& value) noexcept(
}

template <typename T>
auto getAwaiter(T&& value) noexcept(noexcept(getAwaiterImpl(static_cast<T&&>(
value)))) -> decltype(getAwaiterImpl(static_cast<T&&>(value))) {
auto getAwaiter(T&& value) noexcept(
noexcept(getAwaiterImpl(static_cast<T&&>(value))))
-> decltype(getAwaiterImpl(static_cast<T&&>(value))) {
return getAwaiterImpl(static_cast<T&&>(value));
}

Expand Down
6 changes: 4 additions & 2 deletions out/bi_web/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions out/include/impl/coroutine.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ auto getAwaiterImpl(T&& value) noexcept(
}

template <typename T>
auto getAwaiter(T&& value) noexcept(noexcept(getAwaiterImpl(static_cast<T&&>(
value)))) -> decltype(getAwaiterImpl(static_cast<T&&>(value))) {
auto getAwaiter(T&& value) noexcept(
noexcept(getAwaiterImpl(static_cast<T&&>(value))))
-> decltype(getAwaiterImpl(static_cast<T&&>(value))) {
return getAwaiterImpl(static_cast<T&&>(value));
}

Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 4 additions & 2 deletions template/web/bi/xmake.lua.inja
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 5 additions & 3 deletions test_xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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()

Expand Down
4 changes: 3 additions & 1 deletion xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e8a576d

Please sign in to comment.