Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add jthread repo #5236

Merged
merged 8 commits into from
Sep 15, 2024
Merged

add jthread repo #5236

merged 8 commits into from
Sep 15, 2024

Conversation

hahahahbenny
Copy link
Contributor

jthread 是jrtplib所依赖的库,所以在此添加支持

packages/j/jthread/xmake.lua Outdated Show resolved Hide resolved
packages/j/jthread/xmake.lua Outdated Show resolved Hide resolved
add_versions("2023.08.18", "719413043807b77448df3ba1c749798fb72ee459")
add_deps("cmake")

add_patches("1.3.3", "patches/1.3.3/cmakelist.patch", "4c5162f128f31ebee63805db1dbed0a17fc02b2661958b80468fcffc394d7f4e")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

补丁可以去掉了

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果去掉补丁会在shared=true时,仍然会生成静态库

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改补丁

on_test(function (package)
assert(package:check_cxxsnippets({test = [[
using namespace jthread;
class TestThread : public JThread{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

纯类型定义,没任何实例化对象,测不到 links 吧

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

add_deps("cmake", "jthread", "srtp")

on_install(function (package)
io.replace("src/CMakeLists.txt", [[ "Enable -Wall -Wextra -Werror" ON]], [[ "Enable -Wall -Wextra -Werror" OFF]])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里是一个 option,直接 -DJRTPLIB_WARNINGSASERRORS=OFF 就行

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
但是这里只要时gcc工具链就会设置为ON, 所以才如此修改

packages/j/jrtplib/xmake.lua Outdated Show resolved Hide resolved
@star-hengxing star-hengxing merged commit d5382a3 into xmake-io:dev Sep 15, 2024
65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants