-
-
Notifications
You must be signed in to change notification settings - Fork 403
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
onedpl add fetch.lua #4324
onedpl add fetch.lua #4324
Conversation
/* MACROS DUE TO llvm/llvm-project@3b9a1bb#diff-4c6821476cefc699b801f5fdbeda3341e3c64626dcf39a79621ea02031bdd50eL113 */ /* ALSO C.F. oneapi-src/oneDPL#1602 */ /* AND THE USING OF _PSTL_... MACROS IS REMOVED FROM ONEDPL NOWADAYS*/
typo
ci on arch linux failed due to network error
io.replace(...pstl/...): c.f. llvm/llvm-project@3b9a1bb#diff-4c6821476cefc699b801f5fdbeda3341e3c64626dcf39a79621ea02031bdd50eL113 |
@@ -5,17 +5,36 @@ package("onedpl") | |||
set_description("oneAPI DPC++ Library") | |||
|
|||
add_urls("https://github.com/oneapi-src/oneDPL/archive/refs/tags/oneDPL-$(version)-release.tar.gz") | |||
add_urls("https://github.com/oneapi-src/oneDPL/archive/refs/tags/oneDPL-$(version).tar.gz") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
应该放开头,否则每次都有一次 404 failed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果以后出了新的,它是-release.tar.gz而不是.rc?.tar.gz,是不是还要把顺序换回来o.O我在想或者直接把release写到版本号得了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
参考 sqlite3 的包,写 version function
packages/o/onedpl/fetch.lua
Outdated
|
||
function _find_package(package, opt) | ||
local paths = { | ||
"$(env DPL_ROOT)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
缩进不对
packages/o/onedpl/fetch.lua
Outdated
local backend = package:config("backend") | ||
|
||
if backend == "tbb" or backend == "dpcpp" then | ||
package:add("deps", "tbb") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不是这么玩的, fetch 里面不应该 add deps
packages/o/onedpl/fetch.lua
Outdated
package:add("deps", "openmp") | ||
end | ||
if package:is_plat("windows") then | ||
package:add("cxxflags", "/Zc:__cplusplus") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fetch 里面,也不能 add 这种,任何对包的修改都不行
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
噢也就是只能xmake.lua
remove unnecessary add_deps
packages/o/onedpl/fetch.lua
Outdated
end | ||
|
||
if #result.includedirs > 0 then | ||
local version_file = path.join(includepath, "oneapi","dpl","pstl","onedpl_config.h") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
还有这,逗号两边空格
tested with TBB backend
and it should work for omp backend
I wonder if TBB links/linkdirs should be explicitly added or these can be implicitly inferred after adding package deps ("openmp")?