Skip to content

Commit

Permalink
improve openmp
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Jul 15, 2024
1 parent f4e9a1f commit e7804e9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/o/openmp/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,15 @@ package("openmp")
elseif package:has_tool(toolkind, "icl") then
result[flagname] = "-Qopenmp"
end
end
for _, toolkind in ipairs({"ld", "fcld"}) do
if package:config("runtime") == "default" then
if package:has_tool(toolkind, "clang", "clangxx") then
if not package:is_plat("macosx") then
result.ldflags = "-fopenmp"
result.shflags = "-fopenmp"
end
elseif package:has_tool(toolkind, "gcc", "gxx", "gfortran") then
elseif package:has_tool(toolkind, "gcc", "gxx") then
result.ldflags = "-fopenmp"
result.shflags = "-fopenmp"
elseif package:has_tool(toolkind, "icc", "icpc") then
Expand All @@ -71,10 +73,13 @@ package("openmp")
elseif package:has_tool(toolkind, "icl") then
result.ldflags = "-Qopenmp"
result.shflags = "-Qopenmp"
elseif package:has_tool(toolkind, "gfortran") then
result.fcldflags = "-fopenmp"
result.fcshflags = "-fopenmp"
end
end
if package:config("runtime") == "custom" then
if package:has_tool(toolkind, "cl") then
if package:has_tool(toolkind, "link") then
result.ldflags = "/nodefaultlib:vcomp"
result.shflags = "/nodefaultlib:vcomp"
end
Expand Down

0 comments on commit e7804e9

Please sign in to comment.