summaryrefslogtreecommitdiff
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
parentffb4f2c3cbad5fa1836923ee68d0f5322f3c92fa (diff)
fix gitignore and clean files for devlink
-rw-r--r--.gitignore5
-rw-r--r--xmake/rules/cuda/device_link/xmake.lua6
2 files changed, 10 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 99bc3124f..9fab162c8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,5 +22,8 @@ winenv/
# Makefile generation
/core/xmake.config.h
/core/.config.mak
+/core/**/*.o
+/core/**/*.b
+/core/**/*.a
-!/xmake/actions/build/ \ No newline at end of file
+!/xmake/actions/build/
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)