Răsfoiți Sursa

openmp: add cuda support (#7244)

star9029 3 luni în urmă
părinte
comite
d1380798fa
1 a modificat fișierele cu 3 adăugiri și 0 ștergeri
  1. 3 0
      packages/o/openmp/xmake.lua

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

@@ -87,6 +87,9 @@ package("openmp")
         else
         else
             raise("This package(openmp) requires xmake version 2.6.1 or newer.")
             raise("This package(openmp) requires xmake version 2.6.1 or newer.")
         end
         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
         return (result.cflags or result.cxxflags or result.fcflags) and result
     end)
     end)