diff options
| -rw-r--r-- | xmake/modules/detect/sdks/find_cuda.lua | 1 | ||||
| -rw-r--r-- | xmake/rules/cuda/env/xmake.lua | 8 |
2 files changed, 4 insertions, 5 deletions
diff --git a/xmake/modules/detect/sdks/find_cuda.lua b/xmake/modules/detect/sdks/find_cuda.lua index cdad64ac1..d87d5b3b0 100644 --- a/xmake/modules/detect/sdks/find_cuda.lua +++ b/xmake/modules/detect/sdks/find_cuda.lua @@ -68,7 +68,6 @@ function _find_cuda(sdkdir) local linkdirs = {} if is_plat("windows") then local subdir = is_arch("x64") and "x64" or "Win32" - table.insert(linkdirs, path.join(sdkdir, "lib", subdir, "stubs")) table.insert(linkdirs, path.join(sdkdir, "lib", subdir)) elseif is_plat("linux") and is_arch("x86_64") then table.insert(linkdirs, path.join(sdkdir, "lib64", "stubs")) diff --git a/xmake/rules/cuda/env/xmake.lua b/xmake/rules/cuda/env/xmake.lua index a334bb200..a4d408d2d 100644 --- a/xmake/rules/cuda/env/xmake.lua +++ b/xmake/rules/cuda/env/xmake.lua @@ -28,12 +28,12 @@ rule("cuda.env") target:data_set("cuda", cuda) -- add arch - if is_arch("x86_64", "x64") then - target:add("cuflags", "-m64", {force = true}) - target:add("culdflags", "-m64", {force = true}) - else + if is_arch("i386", "x86") then target:add("cuflags", "-m32", {force = true}) target:add("culdflags", "-m32", {force = true}) + else + target:add("cuflags", "-m64", {force = true}) + target:add("culdflags", "-m64", {force = true}) end -- add -ccbin |
