Browse Source

openmp: add cuda support (#7244)

star9029 3 tháng trước cách đây
mục cha
commit
d1380798fa
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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)