diff options
| -rw-r--r-- | xmake/modules/detect/sdks/find_cuda.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/modules/detect/sdks/find_cuda.lua b/xmake/modules/detect/sdks/find_cuda.lua index b7fb4911e..87ac6f3a1 100644 --- a/xmake/modules/detect/sdks/find_cuda.lua +++ b/xmake/modules/detect/sdks/find_cuda.lua @@ -31,13 +31,16 @@ function _find_sdkdir() -- init the search directories local pathes = {} if os.host() == "macosx" then + table.insert(pathes, "/Developer/NVIDIA/CUDA/bin") table.insert(pathes, "/Developer/NVIDIA/CUDA*/bin") elseif os.host() == "windows" then table.insert(pathes, "$(env CUDA_PATH)/bin") else + -- find from default symbol link dir + table.insert(pathes, "/usr/local/cuda/bin") table.insert(pathes, "/usr/local/cuda*/bin") end - table.insert(pathes, "$(env PATH)") + table.join2(pathes, path.splitenv(os.getenv("PATH"))) -- attempt to find nvcc local nvcc = find_file(os.host() == "windows" and "nvcc.exe" or "nvcc", pathes) |
