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"
1616log = " 0.4"
1717tempfile = " 3.0"
1818indexmap = " 1.0"
19-
20- [features ]
21- cuda = []
Original file line number Diff line number Diff line change @@ -15,3 +15,6 @@ libc = "0.2"
1515[build-dependencies ]
1616bindgen = " 0.61"
1717cmake = " 0.1"
18+
19+ [features ]
20+ cuda = []
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ fn main() {
2222 }
2323
2424 // CMake
25+ #[ cfg( feature = "cuda" ) ]
2526 let dst = Config :: new ( & xgb_root)
2627 . uses_cxx11 ( )
2728 . define ( "BUILD_STATIC_LIB" , "ON" )
@@ -30,6 +31,12 @@ fn main() {
3031 . define ( "BUILD_WITH_CUDA_CUB" , "ON" )
3132 . build ( ) ;
3233
34+ #[ cfg( not( feature = "cuda" ) ) ]
35+ let dst = Config :: new ( & xgb_root)
36+ . uses_cxx11 ( )
37+ . define ( "BUILD_STATIC_LIB" , "ON" )
38+ . build ( ) ;
39+
3340 let xgb_root = xgb_root. canonicalize ( ) . unwrap ( ) ;
3441
3542 let bindings = bindgen:: Builder :: default ( )
You can’t perform that action at this time.
0 commit comments