summaryrefslogtreecommitdiff
path: root/xmake/rules/cuda/device_link/xmake.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-06-12 00:08:06 +0800
committerruki <[email protected]>2019-06-11 18:48:37 +0800
commit67987b7da01fe4e2c4b5ae8527008dd854f16c26 (patch)
tree778793ebe6220e9ad9484fb9f49535b1d36fe8d6 /xmake/rules/cuda/device_link/xmake.lua
parentffb4f2c3cbad5fa1836923ee68d0f5322f3c92fa (diff)
fix gitignore and clean files for devlink
Diffstat (limited to 'xmake/rules/cuda/device_link/xmake.lua')
-rw-r--r--xmake/rules/cuda/device_link/xmake.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/rules/cuda/device_link/xmake.lua b/xmake/rules/cuda/device_link/xmake.lua
index 068c8270f..0f390f0d9 100644
--- a/xmake/rules/cuda/device_link/xmake.lua
+++ b/xmake/rules/cuda/device_link/xmake.lua
@@ -24,6 +24,12 @@ rule("cuda.device_link")
-- add rule: cuda environment
add_deps("cuda.env")
+ -- clean files
+ after_clean(function (target)
+ os.tryrm(target:objectfile(path.join(".cuda", "devlink", target:basename() .. "_gpucode.cu")))
+ os.tryrm(target:dependfile(targetfile))
+ end)
+
-- @see https://devblogs.nvidia.com/separate-compilation-linking-cuda-device-code/
before_link(function (target, opt)