File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ mkl-dynamic-lp64-seq = []
27
27
mkl-dynamic-ilp64-iomp = []
28
28
mkl-dynamic-ilp64-seq = []
29
29
30
- # Enable downloading from AWS S3 when not found
31
- download = []
30
+ # Enable downloading from AWS S3 when system MKL not found
31
+ download = [" intel-mkl-tool/archive " ]
32
32
# (Experimental) Cache download archive ad $XDG_DATA_HOME/intel-mkl-tool/
33
33
xdg-data-home = []
34
34
Original file line number Diff line number Diff line change 20
20
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
// SOFTWARE.
22
22
23
+ #![ cfg_attr( feature = "download" , allow( unreachable_code) ) ]
24
+
23
25
use anyhow:: * ;
24
26
use intel_mkl_tool:: * ;
25
27
use std:: { env, path:: * } ;
@@ -51,7 +53,8 @@ fn main() -> Result<()> {
51
53
}
52
54
53
55
// download if not found
54
- if cfg ! ( feature = "download" ) {
56
+ #[ cfg( feature = "download" ) ]
57
+ {
55
58
let path = if cfg ! ( feature = "xdg-data-home" ) {
56
59
xdg_home_path ( )
57
60
} else {
@@ -64,6 +67,8 @@ fn main() -> Result<()> {
64
67
cfg. download ( path) ?;
65
68
let entry = Entry :: from_config ( cfg) . unwrap ( ) ; // must found
66
69
entry. print_cargo_metadata ( ) ;
70
+ return Ok ( ( ) ) ;
67
71
}
68
- Ok ( ( ) )
72
+
73
+ bail ! ( "No MKL found, and download flag is off." ) ;
69
74
}
You can’t perform that action at this time.
0 commit comments