File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,3 @@ derive_builder = "0.5"
16
16
log = " 0.4"
17
17
tempfile = " 3.0"
18
18
indexmap = " 1.0"
19
-
20
- [features ]
21
- cuda = []
Original file line number Diff line number Diff line change @@ -15,3 +15,6 @@ libc = "0.2"
15
15
[build-dependencies ]
16
16
bindgen = " 0.61"
17
17
cmake = " 0.1"
18
+
19
+ [features ]
20
+ cuda = []
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ fn main() {
22
22
}
23
23
24
24
// CMake
25
+ #[ cfg( feature = "cuda" ) ]
25
26
let dst = Config :: new ( & xgb_root)
26
27
. uses_cxx11 ( )
27
28
. define ( "BUILD_STATIC_LIB" , "ON" )
@@ -30,6 +31,12 @@ fn main() {
30
31
. define ( "BUILD_WITH_CUDA_CUB" , "ON" )
31
32
. build ( ) ;
32
33
34
+ #[ cfg( not( feature = "cuda" ) ) ]
35
+ let dst = Config :: new ( & xgb_root)
36
+ . uses_cxx11 ( )
37
+ . define ( "BUILD_STATIC_LIB" , "ON" )
38
+ . build ( ) ;
39
+
33
40
let xgb_root = xgb_root. canonicalize ( ) . unwrap ( ) ;
34
41
35
42
let bindings = bindgen:: Builder :: default ( )
You can’t perform that action at this time.
0 commit comments