diff options
| author | ruki <[email protected]> | 2022-12-11 23:19:24 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-12-11 23:19:24 +0800 |
| commit | 52cb0ae50fe816c8b04b48320064b5910c180b0b (patch) | |
| tree | 0dd27dfafa726276690f3dd9e5f91fc87f9391ce | |
| parent | 8a1033206b2911b0e37e7d31a04a72ea3586b6f1 (diff) | |
| parent | 278a5397b75aa824ddd9416f383a379687182958 (diff) | |
Merge pull request #3157 from star-hengxing/nvcc
fix cuda link vs runtime
| -rw-r--r-- | xmake/languages/cuda/xmake.lua | 1 | ||||
| -rw-r--r-- | xmake/modules/core/tools/nvcc.lua | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/xmake/languages/cuda/xmake.lua b/xmake/languages/cuda/xmake.lua index a50935e4e..119796003 100644 --- a/xmake/languages/cuda/xmake.lua +++ b/xmake/languages/cuda/xmake.lua @@ -39,6 +39,7 @@ language("cuda") , "target.vectorexts:check" , "target.includedirs" , "target.languages" + , "target.runtimes" , "target.defines" , "target.undefines" , "toolchain.includedirs" diff --git a/xmake/modules/core/tools/nvcc.lua b/xmake/modules/core/tools/nvcc.lua index 33c687695..76f16fca6 100644 --- a/xmake/modules/core/tools/nvcc.lua +++ b/xmake/modules/core/tools/nvcc.lua @@ -166,6 +166,13 @@ function nf_optimize(self, level) end end +-- make vs runtime flag +function nf_runtime(self, vs_runtime) + if self:is_plat("windows") and vs_runtime then + return '-Xcompiler "-' .. vs_runtime .. '"' + end +end + -- make the language flag function nf_language(self, stdname) |
