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

onedpl add fetch.lua #4324

Merged
merged 12 commits into from
Jun 11, 2024
Merged

onedpl add fetch.lua #4324

merged 12 commits into from
Jun 11, 2024

Conversation

Altina-oz
Copy link
Contributor

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")?

@Altina-oz
Copy link
Contributor Author

@@ -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")
Copy link
Member

Choose a reason for hiding this comment

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

应该放开头,否则每次都有一次 404 failed

Copy link
Contributor Author

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写到版本号得了

Copy link
Member

Choose a reason for hiding this comment

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

参考 sqlite3 的包,写 version function


function _find_package(package, opt)
local paths = {
"$(env DPL_ROOT)",
Copy link
Member

Choose a reason for hiding this comment

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

缩进不对

local backend = package:config("backend")

if backend == "tbb" or backend == "dpcpp" then
package:add("deps", "tbb")
Copy link
Member

Choose a reason for hiding this comment

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

不是这么玩的, fetch 里面不应该 add deps

package:add("deps", "openmp")
end
if package:is_plat("windows") then
package:add("cxxflags", "/Zc:__cplusplus")
Copy link
Member

Choose a reason for hiding this comment

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

fetch 里面,也不能 add 这种,任何对包的修改都不行

Copy link
Contributor Author

Choose a reason for hiding this comment

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

噢也就是只能xmake.lua

end

if #result.includedirs > 0 then
local version_file = path.join(includepath, "oneapi","dpl","pstl","onedpl_config.h")
Copy link
Member

Choose a reason for hiding this comment

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

还有这,逗号两边空格

@waruqi waruqi merged commit b8fe839 into xmake-io:dev Jun 11, 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.

2 participants