File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -35,22 +35,32 @@ fn main() {
35
35
}
36
36
}
37
37
38
+ let mut dst = Config :: new ( & lgbm_root) ;
39
+
38
40
// CMake
39
41
#[ cfg( feature = "cuda" ) ]
40
- let dst = Config :: new ( & lgbm_root )
42
+ let dst = dst
41
43
. profile ( "Release" )
42
44
. uses_cxx11 ( )
43
45
. define ( "BUILD_STATIC_LIB" , "ON" )
44
46
. define ( "USE_CUDA" , "1" )
45
- . define ( "USE_CUDA_EXP" , "1" )
46
- . build ( ) ;
47
+ . define ( "USE_CUDA_EXP" , "1" ) ;
47
48
48
49
#[ cfg( not( feature = "cuda" ) ) ]
49
- let dst = Config :: new ( & lgbm_root )
50
+ let dst = dst
50
51
. profile ( "Release" )
51
52
. uses_cxx11 ( )
52
- . define ( "BUILD_STATIC_LIB" , "ON" )
53
- . build ( ) ;
53
+ . define ( "BUILD_STATIC_LIB" , "ON" ) ;
54
+
55
+ #[ cfg( target_os = "macos" ) ]
56
+ let dst =
57
+ dst
58
+ . define ( "CMAKE_C_COMPILER" , "/opt/homebrew/opt/llvm/bin/clang" )
59
+ . define ( "CMAKE_CXX_COMPILER" , "/opt/homebrew/opt/llvm/bin/clang++" )
60
+ . define ( "OPENMP_LIBRARIES" , "/opt/homebrew/opt/llvm/lib" )
61
+ . define ( "OPENMP_INCLUDES" , "/opt/homebrew/opt/llvm/include" ) ;
62
+
63
+ let dst = dst. build ( ) ;
54
64
55
65
// bindgen build
56
66
let bindings = bindgen:: Builder :: default ( )
You can’t perform that action at this time.
0 commit comments