diff options
Diffstat (limited to 'tests/projects/cuda_console/xmake.lua')
| -rw-r--r-- | tests/projects/cuda_console/xmake.lua | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/projects/cuda_console/xmake.lua b/tests/projects/cuda_console/xmake.lua new file mode 100644 index 000000000..a1590891e --- /dev/null +++ b/tests/projects/cuda_console/xmake.lua @@ -0,0 +1,23 @@ +-- define target +target("cuda_console") + + -- set kind + set_kind("binary") + + -- add include directories + add_includedirs("inc") + + -- add files + add_files("src/*.cu") + + -- generate SASS code for each SM architecture + for _, sm in ipairs({"30", "35", "37", "50", "52", "60", "61", "70"}) do + add_cuflags("-gencode arch=compute_" .. sm .. ",code=sm_" .. sm) + add_ldflags("-gencode arch=compute_" .. sm .. ",code=sm_" .. sm) + end + + -- generate PTX code from the highest SM architecture to guarantee forward-compatibility + sm = "70" + add_cuflags("-gencode arch=compute_" .. sm .. ",code=compute_" .. sm) + add_ldflags("-gencode arch=compute_" .. sm .. ",code=compute_" .. sm) + |
