浏览代码

openmp: add cuda support (#7244)

star9029 3 月之前
父节点
当前提交
d1380798fa
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      packages/o/openmp/xmake.lua

+ 3 - 0
packages/o/openmp/xmake.lua

@@ -87,6 +87,9 @@ package("openmp")
         else
             raise("This package(openmp) requires xmake version 2.6.1 or newer.")
         end
+        if package:has_tool("cu", "nvcc") and result.cxxflags then
+            result.cuflags = "-Xcompiler " .. result.cxxflags
+        end
         return (result.cflags or result.cxxflags or result.fcflags) and result
     end)