diff options
| author | ruki <[email protected]> | 2019-06-11 00:37:14 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-06-10 21:43:29 +0800 |
| commit | 9f81f22e0d241bfc6ddb2f5b55b75ddfbc3f6851 (patch) | |
| tree | 36c7f6f6107e3b12e55f9b385c889e6b045611f0 | |
| parent | 21fbe003a96514fe92106a6b8fb88fab7ed02fce (diff) | |
improve cuda.env
| -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 |
