File tree Expand file tree Collapse file tree 4 files changed +13
-7
lines changed Expand file tree Collapse file tree 4 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -24,12 +24,13 @@ exclude = [
24
24
]
25
25
26
26
[features ]
27
- default = [" cblas" , " lapacke" ]
27
+ default = [" cblas" , " lapacke" , " tmg " ]
28
28
29
29
cblas = []
30
30
lapacke = []
31
31
static = []
32
32
system = []
33
+ tmg = []
33
34
34
35
[build-dependencies ]
35
36
cmake = " 0.1"
Original file line number Diff line number Diff line change @@ -8,8 +8,9 @@ The following Cargo features are supported:
8
8
9
9
* ` cblas ` to build CBLAS (enabled by default),
10
10
* ` lapacke ` to build LAPACKE (enabled by default),
11
- * ` static ` to link to Netlib statically, and
12
- * ` system ` to skip building the bundled Netlib.
11
+ * ` static ` to link to Netlib statically,
12
+ * ` system ` to skip building the bundled Netlib, and
13
+ * ` tmg ` to build LAPACKE Test Matrix Generator (enabled by default).
13
14
14
15
## Contribution
15
16
Original file line number Diff line number Diff line change @@ -16,13 +16,14 @@ fn main() {
16
16
} ;
17
17
let cblas = feature ! ( "CBLAS" ) ;
18
18
let lapacke = feature ! ( "LAPACKE" ) ;
19
+ let tmg = feature ! ( "TMG" ) ;
19
20
if !feature ! ( "SYSTEM" ) {
20
21
suffix = "-netlib" ;
21
22
let output = Config :: new ( "source" )
22
23
. define ( "BUILD_TESTING" , "OFF" )
23
24
. define ( "BUILD_SHARED_LIBS" , switch ! ( kind == "dylib" ) )
24
25
. define ( "CBLAS" , switch ! ( cblas) )
25
- . define ( "LAPACKE_WITH_TMG" , switch ! ( lapacke) )
26
+ . define ( "LAPACKE_WITH_TMG" , switch ! ( lapacke && tmg ) )
26
27
. define ( "CMAKE_INSTALL_LIBDIR" , "lib" )
27
28
. build ( ) ;
28
29
let output = output. join ( "lib" ) ;
@@ -38,7 +39,9 @@ fn main() {
38
39
}
39
40
if lapacke {
40
41
println ! ( "cargo:rustc-link-lib={}=lapacke" , kind) ;
41
- println ! ( "cargo:rustc-link-lib={}=tmglib" , kind) ;
42
+ if tmg {
43
+ println ! ( "cargo:rustc-link-lib={}=tmglib" , kind) ;
44
+ }
42
45
}
43
46
}
44
47
Original file line number Diff line number Diff line change 6
6
//!
7
7
//! * `cblas` to build CBLAS (enabled by default),
8
8
//! * `lapacke` to build LAPACKE (enabled by default),
9
- //! * `static` to link to Netlib statically, and
10
- //! * `system` to skip building the bundled Netlib.
9
+ //! * `static` to link to Netlib statically,
10
+ //! * `system` to skip building the bundled Netlib, and
11
+ //! * `tmg` to build LAPACKE Test Matrix Generator (enabled by default).
11
12
//!
12
13
//! [blas]: https://en.wikipedia.org/wiki/BLAS
13
14
//! [lapack]: https://en.wikipedia.org/wiki/LAPACK
You can’t perform that action at this time.
0 commit comments