We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d88445 commit a75fc66Copy full SHA for a75fc66
crates/optix_sys/build.rs
@@ -1,4 +1,4 @@
1
-use find_cuda_helper::find_optix_root;
+use find_cuda_helper::{find_cuda_root, find_optix_root};
2
use std::env;
3
4
// OptiX is a bit exotic in how it provides its functions. It uses a function table
@@ -13,9 +13,16 @@ fn main() {
13
that OPTIX_ROOT or OPTIX_ROOT_DIR are set",
14
);
15
header = header.join("include");
16
+ let cuda_dir = find_cuda_root()
17
+ .expect(
18
+ "Unable to find the CUDA SDK, make sure you
19
+ installed it and that CUDA_ROOT is set",
20
+ )
21
+ .join("include");
22
23
cc::Build::new()
24
.file("./optix_stubs.c")
25
+ .include(cuda_dir)
26
.include(header)
27
.cpp(false)
28
.compile("optix_stubs");
0 commit comments