summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxq114 <[email protected]>2022-02-12 00:31:20 +0800
committerxq114 <[email protected]>2022-02-12 00:31:20 +0800
commit00283e93de2af8b265c8264ec21362a6bca9ffd0 (patch)
tree099865844b82fea8c2fd26f385db3bef9be7af0c
parentf13d35a24c2b2452da8e9ee753c171b3f4857bd7 (diff)
add devlink check
-rw-r--r--xmake/plugins/project/cmake/cmakelists.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/xmake/plugins/project/cmake/cmakelists.lua b/xmake/plugins/project/cmake/cmakelists.lua
index 2c55f3ce8..925a4659c 100644
--- a/xmake/plugins/project/cmake/cmakelists.lua
+++ b/xmake/plugins/project/cmake/cmakelists.lua
@@ -203,6 +203,10 @@ function _add_target_sources(cmakelists, target)
cmakelists:print(")")
if has_cuda then
cmakelists:print("set_target_properties(%s PROPERTIES CUDA_SEPARABLE_COMPILATION ON)", target:name())
+ local devlink = target:values("cuda.build.devlink")
+ if devlink ~= nil then
+ cmakelists:print("set_target_properties(%s PROPERTIES CUDA_RESOLVE_DEVICE_SYMBOLS %s)", target:name(), devlink and "ON" or "OFF")
+ end
end
end