build.rs:25 and :33:
if cfg!(target_os = "windows") { "C:/Program Files/..." } else { "/usr/local/cuda" }
Inside a build script cfg!(target_os = ...) reflects the machine running the
build, not the target being built for. Cross compiling to Windows from Linux picks
the Linux paths. The supported way is CARGO_CFG_TARGET_OS.
Also missing println!("cargo:rerun-if-changed=build.rs");. Only cuda/ is
watched, so editing the build script itself doesn't trigger a rebuild.
build.rs:25and:33:Inside a build script
cfg!(target_os = ...)reflects the machine running thebuild, not the target being built for. Cross compiling to Windows from Linux picks
the Linux paths. The supported way is
CARGO_CFG_TARGET_OS.Also missing
println!("cargo:rerun-if-changed=build.rs");. Onlycuda/iswatched, so editing the build script itself doesn't trigger a rebuild.